[Ocfs2-commits] taoma commits r3078 -
branches/ocfs2-1.2/fs/ocfs2/dlm
svn-commits at oss.oracle.com
svn-commits at oss.oracle.com
Thu Jan 10 19:00:24 PST 2008
Author: taoma
Date: 2008-01-10 19:00:24 -0800 (Thu, 10 Jan 2008)
New Revision: 3078
Modified:
branches/ocfs2-1.2/fs/ocfs2/dlm/dlmrecovery.c
Log:
Clear joining_node no matter whether it is in the domain map or not.
Currently the process of dlm join contains 2 steps: query join and assert join.
After query join, the joined node will set its joining_node. So if the joining
node happens to panic before the 2nd step, the joined node will fail to clear
its joining_node flag because that node isn't in the domain map. It at least
cause 2 problems.
1. All the new join request will fail. So no new node can mount the volume.
2. The joined node can't umount the volume since during the umount process it
has to wait for the joining_node to be unknown. So the umount will be hanged.
The solution is to clear the joining_node before we check the domain map.
Signed-off-by: smushran
Modified: branches/ocfs2-1.2/fs/ocfs2/dlm/dlmrecovery.c
===================================================================
--- branches/ocfs2-1.2/fs/ocfs2/dlm/dlmrecovery.c 2008-01-04 23:50:43 UTC (rev 3077)
+++ branches/ocfs2-1.2/fs/ocfs2/dlm/dlmrecovery.c 2008-01-11 03:00:24 UTC (rev 3078)
@@ -2289,6 +2289,12 @@
}
}
+ /* Clean up join state on node death. */
+ if (dlm->joining_node == idx) {
+ mlog(0, "Clearing join state for node %u\n", idx);
+ __dlm_set_joining_node(dlm, DLM_LOCK_RES_OWNER_UNKNOWN);
+ }
+
/* check to see if the node is already considered dead */
if (!test_bit(idx, dlm->live_nodes_map)) {
mlog(0, "for domain %s, node %d is already dead. "
@@ -2307,12 +2313,6 @@
clear_bit(idx, dlm->live_nodes_map);
- /* Clean up join state on node death. */
- if (dlm->joining_node == idx) {
- mlog(0, "Clearing join state for node %u\n", idx);
- __dlm_set_joining_node(dlm, DLM_LOCK_RES_OWNER_UNKNOWN);
- }
-
/* make sure local cleanup occurs before the heartbeat events */
if (!test_bit(idx, dlm->recovery_map))
dlm_do_local_recovery_cleanup(dlm, idx);
More information about the Ocfs2-commits
mailing list