ocfs2/dlm: Remove BUG_ON in dlm recovery when freeing locks of a dead node

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linux Kernel Mailing List
Date: Monday, February 8, 2010 - 5:59 pm

Gitweb:     http://git.kernel.org/linus/cda70ba8c05a8661f882862c4699a31d215ab151
Commit:     cda70ba8c05a8661f882862c4699a31d215ab151
Parent:     079b805782f94f4b278132286a8c9bc4655d1c51
Author:     Sunil Mushran <sunil.mushran@oracle.com>
AuthorDate: Mon Feb 1 17:34:58 2010 -0800
Committer:  Joel Becker <joel.becker@oracle.com>
CommitDate: Wed Feb 3 17:51:41 2010 -0800

    ocfs2/dlm: Remove BUG_ON in dlm recovery when freeing locks of a dead node
    
    During recovery, the dlm frees the locks for the dead node. If it finds a
    lock in a resource for the dead node, it expects that node to also have a
    ref in that lock resource. If not, it BUGs.
    
    ossbz#1175 was filed with the above BUG. Now, while it is correct that we
    should be expecting the ref, I see no reason why we have to BUG. After all,
    we are freeing up the lock and clearing the ref.
    
    This patch replaces the BUG_ON with a printk(). Hopefully, that will give
    us more clues next time this happens.
    
    http://oss.oracle.com/bugzilla/show_bug.cgi?id=1175
    
    Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com>
    Acked-by: Mark Fasheh <mfasheh@suse.com>
    Signed-off-by: Joel Becker <joel.becker@oracle.com>
---
 fs/ocfs2/dlm/dlmrecovery.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/fs/ocfs2/dlm/dlmrecovery.c b/fs/ocfs2/dlm/dlmrecovery.c
index ad71221..344bcf9 100644
--- a/fs/ocfs2/dlm/dlmrecovery.c
+++ b/fs/ocfs2/dlm/dlmrecovery.c
@@ -2243,7 +2243,12 @@ static void dlm_free_dead_locks(struct dlm_ctxt *dlm,
 		mlog(0, "%s:%.*s: freed %u locks for dead node %u, "
 		     "dropping ref from lockres\n", dlm->name,
 		     res->lockname.len, res->lockname.name, freed, dead_node);
-		BUG_ON(!test_bit(dead_node, res->refmap));
+		if(!test_bit(dead_node, res->refmap)) {
+			mlog(ML_ERROR, "%s:%.*s: freed %u locks for dead node %u, "
+			     "but ref was not set\n", dlm->name,
+			     res->lockname.len, res->lockname.name, freed, dead_node);
+			__dlm_print_one_lock_resource(res);
+		}
 		dlm_lockres_clear_refmap_bit(dead_node, res);
 	} else if (test_bit(dead_node, res->refmap)) {
 		mlog(0, "%s:%.*s: dead node %u had a ref, but had "
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
ocfs2/dlm: Remove BUG_ON in dlm recovery when freeing lock ..., Linux Kernel Mailing ..., (Mon Feb 8, 5:59 pm)