Browse Source

ocfs2_dlm: Make dlmunlock() wait for migration to complete

dlmunlock() was not waiting for migration to complete before releasing locks
on locally mastered locks.

Signed-off-by: Kurt Hackel <kurt.hackel@oracle.com>
Signed-off-by: Sunil Mushran <Sunil.Mushran@oracle.com>
Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
Kurt Hackel 18 years ago
parent
commit
71ac106243
2 changed files with 5 additions and 0 deletions
  1. 1 0
      fs/ocfs2/dlm/dlmrecovery.c
  2. 4 0
      fs/ocfs2/dlm/dlmunlock.c

+ 1 - 0
fs/ocfs2/dlm/dlmrecovery.c

@@ -1763,6 +1763,7 @@ static int dlm_process_recovery_data(struct dlm_ctxt *dlm,
 					       "with cookie %u:%llu!\n",
 					       "with cookie %u:%llu!\n",
 					       dlm_get_lock_cookie_node(c),
 					       dlm_get_lock_cookie_node(c),
 					       dlm_get_lock_cookie_seq(c));
 					       dlm_get_lock_cookie_seq(c));
+				__dlm_print_one_lock_resource(res);
 				BUG();
 				BUG();
 			}
 			}
 			BUG_ON(lock->ml.node != ml->node);
 			BUG_ON(lock->ml.node != ml->node);

+ 4 - 0
fs/ocfs2/dlm/dlmunlock.c

@@ -147,6 +147,10 @@ static enum dlm_status dlmunlock_common(struct dlm_ctxt *dlm,
 		goto leave;
 		goto leave;
 	}
 	}
 
 
+	if (res->state & DLM_LOCK_RES_MIGRATING) {
+		status = DLM_MIGRATING;
+		goto leave;
+	}
 
 
 	/* see above for what the spec says about
 	/* see above for what the spec says about
 	 * LKM_CANCEL and the lock queue state */
 	 * LKM_CANCEL and the lock queue state */