diff options
Diffstat (limited to 'fs/ocfs2/dlmglue.c')
-rw-r--r-- | fs/ocfs2/dlmglue.c | 54 |
1 files changed, 29 insertions, 25 deletions
diff --git a/fs/ocfs2/dlmglue.c b/fs/ocfs2/dlmglue.c index 27e43b0c0eae..024777abc8e3 100644 --- a/fs/ocfs2/dlmglue.c +++ b/fs/ocfs2/dlmglue.c | |||
@@ -104,6 +104,35 @@ static int ocfs2_dentry_convert_worker(struct ocfs2_lock_res *lockres, | |||
104 | static void ocfs2_dentry_post_unlock(struct ocfs2_super *osb, | 104 | static void ocfs2_dentry_post_unlock(struct ocfs2_super *osb, |
105 | struct ocfs2_lock_res *lockres); | 105 | struct ocfs2_lock_res *lockres); |
106 | 106 | ||
107 | |||
108 | #define mlog_meta_lvb(__level, __lockres) ocfs2_dump_meta_lvb_info(__level, __PRETTY_FUNCTION__, __LINE__, __lockres) | ||
109 | |||
110 | /* This aids in debugging situations where a bad LVB might be involved. */ | ||
111 | static void ocfs2_dump_meta_lvb_info(u64 level, | ||
112 | const char *function, | ||
113 | unsigned int line, | ||
114 | struct ocfs2_lock_res *lockres) | ||
115 | { | ||
116 | struct ocfs2_meta_lvb *lvb = (struct ocfs2_meta_lvb *) lockres->l_lksb.lvb; | ||
117 | |||
118 | mlog(level, "LVB information for %s (called from %s:%u):\n", | ||
119 | lockres->l_name, function, line); | ||
120 | mlog(level, "version: %u, clusters: %u, generation: 0x%x\n", | ||
121 | lvb->lvb_version, be32_to_cpu(lvb->lvb_iclusters), | ||
122 | be32_to_cpu(lvb->lvb_igeneration)); | ||
123 | mlog(level, "size: %llu, uid %u, gid %u, mode 0x%x\n", | ||
124 | (unsigned long long)be64_to_cpu(lvb->lvb_isize), | ||
125 | be32_to_cpu(lvb->lvb_iuid), be32_to_cpu(lvb->lvb_igid), | ||
126 | be16_to_cpu(lvb->lvb_imode)); | ||
127 | mlog(level, "nlink %u, atime_packed 0x%llx, ctime_packed 0x%llx, " | ||
128 | "mtime_packed 0x%llx iattr 0x%x\n", be16_to_cpu(lvb->lvb_inlink), | ||
129 | (long long)be64_to_cpu(lvb->lvb_iatime_packed), | ||
130 | (long long)be64_to_cpu(lvb->lvb_ictime_packed), | ||
131 | (long long)be64_to_cpu(lvb->lvb_imtime_packed), | ||
132 | be32_to_cpu(lvb->lvb_iattr)); | ||
133 | } | ||
134 | |||
135 | |||
107 | /* | 136 | /* |
108 | * OCFS2 Lock Resource Operations | 137 | * OCFS2 Lock Resource Operations |
109 | * | 138 | * |
@@ -3078,28 +3107,3 @@ static void ocfs2_schedule_blocked_lock(struct ocfs2_super *osb, | |||
3078 | 3107 | ||
3079 | mlog_exit_void(); | 3108 | mlog_exit_void(); |
3080 | } | 3109 | } |
3081 | |||
3082 | /* This aids in debugging situations where a bad LVB might be involved. */ | ||
3083 | void 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 | } | ||