All of lore.kernel.org
 help / color / mirror / Atom feed
* [Ocfs2-devel] [PATCH] ocfs2: skip locks in the blocked list
@ 2012-08-14  2:03 Xue jiufei
  2012-08-14 16:03 ` Sunil Mushran
  2012-08-15  6:41 ` [Ocfs2-devel] [PATCH] ocfs2: skip locks in the blocked list Joel Becker
  0 siblings, 2 replies; 6+ messages in thread
From: Xue jiufei @ 2012-08-14  2:03 UTC (permalink / raw)
  To: ocfs2-devel

  A parallel umount on 4 nodes triggered a bug in dlm_process_recovery_date(). Here?s the situation:
  Receiving MIG_LOCKRES message, A node processes the locks in migratable lockres. It copys lvb from migratable lockres when processing the first valid lock. 
If there is a lock in the blocked list with the EX level, it triggers the BUG. Since valid lvbs are set when locks are granted with EX or PR levels, locks in 
the blocked list cannot have valid lvbs. Therefore I think we should skip the locks in the blocked list.

Signed-off-by: Xuejiufei <xuejiufei@huawei.com>
---
 fs/ocfs2/dlm/dlmrecovery.c |    7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/fs/ocfs2/dlm/dlmrecovery.c b/fs/ocfs2/dlm/dlmrecovery.c
index 01ebfd0..15d81ad 100644
--- a/fs/ocfs2/dlm/dlmrecovery.c
+++ b/fs/ocfs2/dlm/dlmrecovery.c
@@ -1887,6 +1887,13 @@ static int dlm_process_recovery_data(struct dlm_ctxt *dlm,
 
 		if (ml->type == LKM_NLMODE)
 			goto skip_lvb;
+		
+		/*
+		 * If the lock is in the blocked list it can't have a valid lvb,
+		 * so skip it
+		 */
+		if (ml->list == DLM_BLOCKED_LIST)
+			goto skip_lvb;
 
 		if (!dlm_lvb_is_empty(mres->lvb)) {
 			if (lksb->flags & DLM_LKSB_PUT_LVB) {
-- 
1.7.9.7

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-08-15 18:43 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-14  2:03 [Ocfs2-devel] [PATCH] ocfs2: skip locks in the blocked list Xue jiufei
2012-08-14 16:03 ` Sunil Mushran
2012-08-15  6:28   ` Xue jiufei
2012-08-15 16:11     ` Sunil Mushran
2012-08-15 18:43       ` [Ocfs2-devel] ocfs2 + quota next oops - Mayby help with diagnose problem Marek Królikowski
2012-08-15  6:41 ` [Ocfs2-devel] [PATCH] ocfs2: skip locks in the blocked list Joel Becker

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.