| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
|---|
| 1 | 2 | /* -*- mode: c; c-basic-offset: 8; -*- |
|---|
| 2 | 3 | * vim: noexpandtab sw=8 ts=8 sts=0: |
|---|
| 3 | 4 | * |
|---|
| .. | .. |
|---|
| 6 | 7 | * standalone DLM module |
|---|
| 7 | 8 | * |
|---|
| 8 | 9 | * Copyright (C) 2004 Oracle. All rights reserved. |
|---|
| 9 | | - * |
|---|
| 10 | | - * This program is free software; you can redistribute it and/or |
|---|
| 11 | | - * modify it under the terms of the GNU General Public |
|---|
| 12 | | - * License as published by the Free Software Foundation; either |
|---|
| 13 | | - * version 2 of the License, or (at your option) any later version. |
|---|
| 14 | | - * |
|---|
| 15 | | - * This program is distributed in the hope that it will be useful, |
|---|
| 16 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 17 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|---|
| 18 | | - * General Public License for more details. |
|---|
| 19 | | - * |
|---|
| 20 | | - * You should have received a copy of the GNU General Public |
|---|
| 21 | | - * License along with this program; if not, write to the |
|---|
| 22 | | - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
|---|
| 23 | | - * Boston, MA 021110-1307, USA. |
|---|
| 24 | | - * |
|---|
| 25 | 10 | */ |
|---|
| 26 | 11 | |
|---|
| 27 | 12 | |
|---|
| .. | .. |
|---|
| 40 | 25 | #include <linux/delay.h> |
|---|
| 41 | 26 | |
|---|
| 42 | 27 | |
|---|
| 43 | | -#include "cluster/heartbeat.h" |
|---|
| 44 | | -#include "cluster/nodemanager.h" |
|---|
| 45 | | -#include "cluster/tcp.h" |
|---|
| 28 | +#include "../cluster/heartbeat.h" |
|---|
| 29 | +#include "../cluster/nodemanager.h" |
|---|
| 30 | +#include "../cluster/tcp.h" |
|---|
| 46 | 31 | |
|---|
| 47 | 32 | #include "dlmapi.h" |
|---|
| 48 | 33 | #include "dlmcommon.h" |
|---|
| 49 | 34 | #include "dlmdomain.h" |
|---|
| 50 | 35 | |
|---|
| 51 | 36 | #define MLOG_MASK_PREFIX (ML_DLM|ML_DLM_THREAD) |
|---|
| 52 | | -#include "cluster/masklog.h" |
|---|
| 37 | +#include "../cluster/masklog.h" |
|---|
| 53 | 38 | |
|---|
| 54 | 39 | static int dlm_thread(void *data); |
|---|
| 55 | 40 | static void dlm_flush_asts(struct dlm_ctxt *dlm); |
|---|
| 56 | | - |
|---|
| 57 | | -#define dlm_lock_is_remote(dlm, lock) ((lock)->ml.node != (dlm)->node_num) |
|---|
| 58 | 41 | |
|---|
| 59 | 42 | /* will exit holding res->spinlock, but may drop in function */ |
|---|
| 60 | 43 | /* waits until flags are cleared on res->state */ |
|---|
| .. | .. |
|---|
| 531 | 514 | assert_spin_locked(&res->spinlock); |
|---|
| 532 | 515 | |
|---|
| 533 | 516 | /* don't shuffle secondary queues */ |
|---|
| 534 | | - if ((res->owner == dlm->node_num)) { |
|---|
| 517 | + if (res->owner == dlm->node_num) { |
|---|
| 535 | 518 | if (res->state & (DLM_LOCK_RES_MIGRATING | |
|---|
| 536 | 519 | DLM_LOCK_RES_BLOCK_DIRTY)) |
|---|
| 537 | 520 | return; |
|---|
| .. | .. |
|---|
| 695 | 678 | |
|---|
| 696 | 679 | #define DLM_THREAD_TIMEOUT_MS (4 * 1000) |
|---|
| 697 | 680 | #define DLM_THREAD_MAX_DIRTY 100 |
|---|
| 698 | | -#define DLM_THREAD_MAX_ASTS 10 |
|---|
| 699 | 681 | |
|---|
| 700 | 682 | static int dlm_thread(void *data) |
|---|
| 701 | 683 | { |
|---|