hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
kernel/fs/ocfs2/dlm/dlmthread.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /* -*- mode: c; c-basic-offset: 8; -*-
23 * vim: noexpandtab sw=8 ts=8 sts=0:
34 *
....@@ -6,22 +7,6 @@
67 * standalone DLM module
78 *
89 * 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
- *
2510 */
2611
2712
....@@ -40,21 +25,19 @@
4025 #include <linux/delay.h>
4126
4227
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"
4631
4732 #include "dlmapi.h"
4833 #include "dlmcommon.h"
4934 #include "dlmdomain.h"
5035
5136 #define MLOG_MASK_PREFIX (ML_DLM|ML_DLM_THREAD)
52
-#include "cluster/masklog.h"
37
+#include "../cluster/masklog.h"
5338
5439 static int dlm_thread(void *data);
5540 static void dlm_flush_asts(struct dlm_ctxt *dlm);
56
-
57
-#define dlm_lock_is_remote(dlm, lock) ((lock)->ml.node != (dlm)->node_num)
5841
5942 /* will exit holding res->spinlock, but may drop in function */
6043 /* waits until flags are cleared on res->state */
....@@ -531,7 +514,7 @@
531514 assert_spin_locked(&res->spinlock);
532515
533516 /* don't shuffle secondary queues */
534
- if ((res->owner == dlm->node_num)) {
517
+ if (res->owner == dlm->node_num) {
535518 if (res->state & (DLM_LOCK_RES_MIGRATING |
536519 DLM_LOCK_RES_BLOCK_DIRTY))
537520 return;
....@@ -695,7 +678,6 @@
695678
696679 #define DLM_THREAD_TIMEOUT_MS (4 * 1000)
697680 #define DLM_THREAD_MAX_DIRTY 100
698
-#define DLM_THREAD_MAX_ASTS 10
699681
700682 static int dlm_thread(void *data)
701683 {