aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/dlmglue.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ocfs2/dlmglue.c')
-rw-r--r--fs/ocfs2/dlmglue.c55
1 files changed, 29 insertions, 26 deletions
diff --git a/fs/ocfs2/dlmglue.c b/fs/ocfs2/dlmglue.c
index 27e43b0c0eae..d1bd305ef0d7 100644
--- a/fs/ocfs2/dlmglue.c
+++ b/fs/ocfs2/dlmglue.c
@@ -27,7 +27,6 @@
27#include <linux/slab.h> 27#include <linux/slab.h>
28#include <linux/highmem.h> 28#include <linux/highmem.h>
29#include <linux/mm.h> 29#include <linux/mm.h>
30#include <linux/smp_lock.h>
31#include <linux/crc32.h> 30#include <linux/crc32.h>
32#include <linux/kthread.h> 31#include <linux/kthread.h>
33#include <linux/pagemap.h> 32#include <linux/pagemap.h>
@@ -104,6 +103,35 @@ static int ocfs2_dentry_convert_worker(struct ocfs2_lock_res *lockres,
104static void ocfs2_dentry_post_unlock(struct ocfs2_super *osb, 103static void ocfs2_dentry_post_unlock(struct ocfs2_super *osb,
105 struct ocfs2_lock_res *lockres); 104 struct ocfs2_lock_res *lockres);
106 105
106
107#define mlog_meta_lvb(__level, __lockres) ocfs2_dump_meta_lvb_info(__level, __PRETTY_FUNCTION__, __LINE__, __lockres)
108
109/* This aids in debugging situations where a bad LVB might be involved. */
110static void ocfs2_dump_meta_lvb_info(u64 level,
111 const char *function,
112 unsigned int line,
113 struct ocfs2_lock_res *lockres)
114{
115 struct ocfs2_meta_lvb *lvb = (struct ocfs2_meta_lvb *) lockres->l_lksb.lvb;
116
117 mlog(level, "LVB information for %s (called from %s:%u):\n",
118 lockres->l_name, function, line);
119 mlog(level, "version: %u, clusters: %u, generation: 0x%x\n",
120 lvb->lvb_version, be32_to_cpu(lvb->lvb_iclusters),
121 be32_to_cpu(lvb->lvb_igeneration));
122 mlog(level, "size: %llu, uid %u, gid %u, mode 0x%x\n",
123 (unsigned long long)be64_to_cpu(lvb->lvb_isize),
124 be32_to_cpu(lvb->lvb_iuid), be32_to_cpu(lvb->lvb_igid),
125 be16_to_cpu(lvb->lvb_imode));
126 mlog(level, "nlink %u, atime_packed 0x%llx, ctime_packed 0x%llx, "
127 "mtime_packed 0x%llx iattr 0x%x\n", be16_to_cpu(lvb->lvb_inlink),
128 (long long)be64_to_cpu(lvb->lvb_iatime_packed),
129 (long long)be64_to_cpu(lvb->lvb_ictime_packed),
130 (long long)be64_to_cpu(lvb->lvb_imtime_packed),
131 be32_to_cpu(lvb->lvb_iattr));
132}
133
134
107/* 135/*
108 * OCFS2 Lock Resource Operations 136 * OCFS2 Lock Resource Operations
109 * 137 *
@@ -3078,28 +3106,3 @@ static void ocfs2_schedule_blocked_lock(struct ocfs2_super *osb,
3078 3106
3079 mlog_exit_void(); 3107 mlog_exit_void();
3080} 3108}
3081
3082/* This aids in debugging situations where a bad LVB might be involved. */
3083void ocfs2_dump_meta_lvb_info(u64 level,
3084 const char *function,
3085 unsigned int line,
3086 struct ocfs2_lock_res *lockres)
3087{
3088 struct ocfs2_meta_lvb *lvb = (struct ocfs2_meta_lvb *) lockres->l_lksb.lvb;
3089
3090 mlog(level, "LVB information for %s (called from %s:%u):\n",
3091 lockres->l_name, function, line);
3092 mlog(level, "version: %u, clusters: %u, generation: 0x%x\n",
3093 lvb->lvb_version, be32_to_cpu(lvb->lvb_iclusters),
3094 be32_to_cpu(lvb->lvb_igeneration));
3095 mlog(level, "size: %llu, uid %u, gid %u, mode 0x%x\n",
3096 (unsigned long long)be64_to_cpu(lvb->lvb_isize),
3097 be32_to_cpu(lvb->lvb_iuid), be32_to_cpu(lvb->lvb_igid),
3098 be16_to_cpu(lvb->lvb_imode));
3099 mlog(level, "nlink %u, atime_packed 0x%llx, ctime_packed 0x%llx, "
3100 "mtime_packed 0x%llx iattr 0x%x\n", be16_to_cpu(lvb->lvb_inlink),
3101 (long long)be64_to_cpu(lvb->lvb_iatime_packed),
3102 (long long)be64_to_cpu(lvb->lvb_ictime_packed),
3103 (long long)be64_to_cpu(lvb->lvb_imtime_packed),
3104 be32_to_cpu(lvb->lvb_iattr));
3105}