forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-09-20 a36159eec6ca17402b0e146b86efaf76568dc353
kernel/fs/ocfs2/dlm/dlmmaster.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,9 +25,9 @@
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"
....@@ -50,7 +35,7 @@
5035 #include "dlmdebug.h"
5136
5237 #define MLOG_MASK_PREFIX (ML_DLM|ML_DLM_MASTER)
53
-#include "cluster/masklog.h"
38
+#include "../cluster/masklog.h"
5439
5540 static void dlm_mle_node_down(struct dlm_ctxt *dlm,
5641 struct dlm_master_list_entry *mle,
....@@ -2176,7 +2161,7 @@
21762161 * think that $RECOVERY is currently mastered by a dead node. If so,
21772162 * we wait a short time to allow that node to get notified by its own
21782163 * heartbeat stack, then check again. All $RECOVERY lock resources
2179
- * mastered by dead nodes are purged when the hearbeat callback is
2164
+ * mastered by dead nodes are purged when the heartbeat callback is
21802165 * fired, so we can know for sure that it is safe to continue once
21812166 * the node returns a live node or no node. */
21822167 static int dlm_pre_master_reco_lockres(struct dlm_ctxt *dlm,
....@@ -2569,8 +2554,6 @@
25692554 if (!dlm_grab(dlm))
25702555 return -EINVAL;
25712556
2572
- BUG_ON(target == O2NM_MAX_NODES);
2573
-
25742557 name = res->lockname.name;
25752558 namelen = res->lockname.len;
25762559
....@@ -2766,8 +2749,6 @@
27662749 return ret;
27672750 }
27682751
2769
-#define DLM_MIGRATION_RETRY_MS 100
2770
-
27712752 /*
27722753 * Should be called only after beginning the domain leave process.
27732754 * There should not be any remaining locks on nonlocal lock resources,
....@@ -2779,6 +2760,7 @@
27792760 * Returns: 1 if dlm->spinlock was dropped/retaken, 0 if never dropped
27802761 */
27812762 int dlm_empty_lockres(struct dlm_ctxt *dlm, struct dlm_lock_resource *res)
2763
+ __must_hold(&dlm->spinlock)
27822764 {
27832765 int ret;
27842766 int lock_dropped = 0;