]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blame - src/patches/suse-2.6.27.31/patches.fixes/ocfs2-dlm-indent-dlm_cleanup_master_list.patch
Move xen patchset to new version's subdir.
[people/pmueller/ipfire-2.x.git] / src / patches / suse-2.6.27.31 / patches.fixes / ocfs2-dlm-indent-dlm_cleanup_master_list.patch
CommitLineData
00e5a55c
BS
1From: Sunil Mushran <sunil.mushran@oracle.com>
2Date: Thu, 26 Feb 2009 15:00:42 -0800
3Subject: ocfs2/dlm: Indent dlm_cleanup_master_list()
4Patch-mainline: 2.6.30
5References: bnc#408304
6
7The previous patch explicitly did not indent dlm_cleanup_master_list()
8so as to make the patch readable. This patch properly indents the
9function.
10
11Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com>
12Signed-off-by: Mark Fasheh <mfasheh@suse.com>
13---
14 fs/ocfs2/dlm/dlmmaster.c | 106 ++++++++++++++++++++++-----------------------
15 1 files changed, 52 insertions(+), 54 deletions(-)
16
17Index: linux-2.6.27-sle11_ocfs2_update/fs/ocfs2/dlm/dlmmaster.c
18===================================================================
19--- linux-2.6.27-sle11_ocfs2_update.orig/fs/ocfs2/dlm/dlmmaster.c
20+++ linux-2.6.27-sle11_ocfs2_update/fs/ocfs2/dlm/dlmmaster.c
21@@ -3298,66 +3298,64 @@ top:
22 mle = hlist_entry(list, struct dlm_master_list_entry,
23 master_hash_node);
24
25- BUG_ON(mle->type != DLM_MLE_BLOCK &&
26- mle->type != DLM_MLE_MASTER &&
27- mle->type != DLM_MLE_MIGRATION);
28-
29- /* MASTER mles are initiated locally. the waiting
30- * process will notice the node map change
31- * shortly. let that happen as normal. */
32- if (mle->type == DLM_MLE_MASTER)
33- continue;
34-
35-
36- /* BLOCK mles are initiated by other nodes.
37- * need to clean up if the dead node would have
38- * been the master. */
39- if (mle->type == DLM_MLE_BLOCK) {
40- dlm_clean_block_mle(dlm, mle, dead_node);
41- continue;
42- }
43-
44- /* everything else is a MIGRATION mle */
45-
46- /* the rule for MIGRATION mles is that the master
47- * becomes UNKNOWN if *either* the original or
48- * the new master dies. all UNKNOWN lockreses
49- * are sent to whichever node becomes the recovery
50- * master. the new master is responsible for
51- * determining if there is still a master for
52- * this lockres, or if he needs to take over
53- * mastery. either way, this node should expect
54- * another message to resolve this. */
55- if (mle->master != dead_node &&
56- mle->new_master != dead_node)
57- continue;
58-
59- /* if we have reached this point, this mle needs to
60- * be removed from the list and freed. */
61- dlm_clean_migration_mle(dlm, mle);
62-
63- mlog(0, "%s: node %u died during migration from "
64- "%u to %u!\n", dlm->name, dead_node,
65- mle->master, mle->new_master);
66-
67- /* If we find a lockres associated with the mle, we've
68- * hit this rare case that messes up our lock ordering.
69- * If so, we need to drop the master lock so that we can
70- * take the lockres lock, meaning that we will have to
71- * restart from the head of list. */
72- res = dlm_reset_mleres_owner(dlm, mle);
73- if (res)
74- /* restart */
75- goto top;
76+ BUG_ON(mle->type != DLM_MLE_BLOCK &&
77+ mle->type != DLM_MLE_MASTER &&
78+ mle->type != DLM_MLE_MIGRATION);
79+
80+ /* MASTER mles are initiated locally. The waiting
81+ * process will notice the node map change shortly.
82+ * Let that happen as normal. */
83+ if (mle->type == DLM_MLE_MASTER)
84+ continue;
85+
86+ /* BLOCK mles are initiated by other nodes. Need to
87+ * clean up if the dead node would have been the
88+ * master. */
89+ if (mle->type == DLM_MLE_BLOCK) {
90+ dlm_clean_block_mle(dlm, mle, dead_node);
91+ continue;
92+ }
93+
94+ /* Everything else is a MIGRATION mle */
95+
96+ /* The rule for MIGRATION mles is that the master
97+ * becomes UNKNOWN if *either* the original or the new
98+ * master dies. All UNKNOWN lockres' are sent to
99+ * whichever node becomes the recovery master. The new
100+ * master is responsible for determining if there is
101+ * still a master for this lockres, or if he needs to
102+ * take over mastery. Either way, this node should
103+ * expect another message to resolve this. */
104+
105+ if (mle->master != dead_node &&
106+ mle->new_master != dead_node)
107+ continue;
108+
109+ /* If we have reached this point, this mle needs to be
110+ * removed from the list and freed. */
111+ dlm_clean_migration_mle(dlm, mle);
112+
113+ mlog(0, "%s: node %u died during migration from "
114+ "%u to %u!\n", dlm->name, dead_node, mle->master,
115+ mle->new_master);
116+
117+ /* If we find a lockres associated with the mle, we've
118+ * hit this rare case that messes up our lock ordering.
119+ * If so, we need to drop the master lock so that we can
120+ * take the lockres lock, meaning that we will have to
121+ * restart from the head of list. */
122+ res = dlm_reset_mleres_owner(dlm, mle);
123+ if (res)
124+ /* restart */
125+ goto top;
126
127- /* this may be the last reference */
128- __dlm_put_mle(mle);
129- }
130+ /* This may be the last reference */
131+ __dlm_put_mle(mle);
132+ }
133 }
134 spin_unlock(&dlm->master_lock);
135 }
136
137-
138 int dlm_finish_migration(struct dlm_ctxt *dlm, struct dlm_lock_resource *res,
139 u8 old_master)
140 {