]> err.no Git - linux-2.6/commitdiff
ocfs2: Abstract out a debugging function for underlying dlms.
authorJoel Becker <joel.becker@oracle.com>
Wed, 30 Jan 2008 00:59:55 +0000 (16:59 -0800)
committerMark Fasheh <mfasheh@suse.com>
Fri, 18 Apr 2008 15:56:04 +0000 (08:56 -0700)
dlmglue.c was still referencing a raw o2dlm lksb in one instance.  Let's
create a generic ocfs2_dlm_dump_lksb() function.  This allows underlying
DLMs to print whatever they want about their lock.

We then move the o2dlm dump into stackglue.c where it belongs.

Signed-off-by: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>
fs/ocfs2/dlmglue.c
fs/ocfs2/stackglue.c
fs/ocfs2/stackglue.h

index b640423b936ab46668276b483da8e4bd54942c53..f41ff1c10ae8892056ae59d2ae63a2356de69219 100644 (file)
@@ -2803,8 +2803,7 @@ static int ocfs2_drop_lock(struct ocfs2_super *osb,
        if (ret) {
                ocfs2_log_dlm_error("ocfs2_dlm_unlock", ret, lockres);
                mlog(ML_ERROR, "lockres flags: %lu\n", lockres->l_flags);
-               /* XXX Need to abstract this */
-               dlm_print_one_lock(lockres->l_lksb.lksb_o2dlm.lockid);
+               ocfs2_dlm_dump_lksb(&lockres->l_lksb);
                BUG();
        }
        mlog(0, "lock %s, successfull return from ocfs2_dlm_unlock\n",
index abdb9f6f4cc9e742045134cab063cf3d4251c49f..bd805411a8566f035b0c4e983e8018748eec08f6 100644 (file)
@@ -252,6 +252,11 @@ void *ocfs2_dlm_lvb(union ocfs2_dlm_lksb *lksb)
        return (void *)(lksb->lksb_o2dlm.lvb);
 }
 
+void ocfs2_dlm_dump_lksb(union ocfs2_dlm_lksb *lksb)
+{
+       dlm_print_one_lock(lksb->lksb_o2dlm.lockid);
+}
+
 /*
  * Called from the dlm when it's about to evict a node. This is how the
  * classic stack signals node death.
index 22af77b9a6909caf364e352a114dacc3272c6ec3..01e3c9b9192ac74a4ab2d9dff247066e995a0dae 100644 (file)
@@ -91,6 +91,7 @@ int ocfs2_dlm_unlock(struct ocfs2_cluster_connection *conn,
 
 int ocfs2_dlm_lock_status(union ocfs2_dlm_lksb *lksb);
 void *ocfs2_dlm_lvb(union ocfs2_dlm_lksb *lksb);
+void ocfs2_dlm_dump_lksb(union ocfs2_dlm_lksb *lksb);
 
 void o2cb_get_stack(struct ocfs2_locking_protocol *proto);
 void o2cb_put_stack(void);