aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/super.c
diff options
context:
space:
mode:
authorSunil Mushran <sunil.mushran@oracle.com>2009-06-19 17:45:55 -0400
committerJoel Becker <joel.becker@oracle.com>2009-06-22 17:24:49 -0400
commitc3d38840abaa45c1c5a5fabbb8ffc9a0d1a764d1 (patch)
treed42dca338681a53ca1bdbdfb17e932f1e4e96885 /fs/ocfs2/super.c
parent94e41ecfe0f202df948fdbb19a53308a58cf2184 (diff)
ocfs2: Fix ocfs2_osb_dump()
Skip printing information that is not valid for local mounts. Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com> Signed-off-by: Joel Becker <joel.becker@oracle.com>
Diffstat (limited to 'fs/ocfs2/super.c')
-rw-r--r--fs/ocfs2/super.c32
1 files changed, 18 insertions, 14 deletions
diff --git a/fs/ocfs2/super.c b/fs/ocfs2/super.c
index d33767f17ba3..d64739b593e9 100644
--- a/fs/ocfs2/super.c
+++ b/fs/ocfs2/super.c
@@ -234,20 +234,24 @@ static int ocfs2_osb_dump(struct ocfs2_super *osb, char *buf, int len)
234 "%10s => Opts: 0x%lX AtimeQuanta: %u\n", "Mount", 234 "%10s => Opts: 0x%lX AtimeQuanta: %u\n", "Mount",
235 osb->s_mount_opt, osb->s_atime_quantum); 235 osb->s_mount_opt, osb->s_atime_quantum);
236 236
237 out += snprintf(buf + out, len - out, 237 if (cconn) {
238 "%10s => Stack: %s Name: %*s Version: %d.%d\n", 238 out += snprintf(buf + out, len - out,
239 "Cluster", 239 "%10s => Stack: %s Name: %*s "
240 (*osb->osb_cluster_stack == '\0' ? 240 "Version: %d.%d\n", "Cluster",
241 "o2cb" : osb->osb_cluster_stack), 241 (*osb->osb_cluster_stack == '\0' ?
242 cconn->cc_namelen, cconn->cc_name, 242 "o2cb" : osb->osb_cluster_stack),
243 cconn->cc_version.pv_major, cconn->cc_version.pv_minor); 243 cconn->cc_namelen, cconn->cc_name,
244 cconn->cc_version.pv_major,
245 cconn->cc_version.pv_minor);
246 }
244 247
245 spin_lock(&osb->dc_task_lock); 248 spin_lock(&osb->dc_task_lock);
246 out += snprintf(buf + out, len - out, 249 out += snprintf(buf + out, len - out,
247 "%10s => Pid: %d Count: %lu WakeSeq: %lu " 250 "%10s => Pid: %d Count: %lu WakeSeq: %lu "
248 "WorkSeq: %lu\n", "DownCnvt", 251 "WorkSeq: %lu\n", "DownCnvt",
249 task_pid_nr(osb->dc_task), osb->blocked_lock_count, 252 (osb->dc_task ? task_pid_nr(osb->dc_task) : -1),
250 osb->dc_wake_sequence, osb->dc_work_sequence); 253 osb->blocked_lock_count, osb->dc_wake_sequence,
254 osb->dc_work_sequence);
251 spin_unlock(&osb->dc_task_lock); 255 spin_unlock(&osb->dc_task_lock);
252 256
253 spin_lock(&osb->osb_lock); 257 spin_lock(&osb->osb_lock);
@@ -267,14 +271,15 @@ static int ocfs2_osb_dump(struct ocfs2_super *osb, char *buf, int len)
267 271
268 out += snprintf(buf + out, len - out, 272 out += snprintf(buf + out, len - out,
269 "%10s => Pid: %d Interval: %lu Needs: %d\n", "Commit", 273 "%10s => Pid: %d Interval: %lu Needs: %d\n", "Commit",
270 task_pid_nr(osb->commit_task), osb->osb_commit_interval, 274 (osb->commit_task ? task_pid_nr(osb->commit_task) : -1),
275 osb->osb_commit_interval,
271 atomic_read(&osb->needs_checkpoint)); 276 atomic_read(&osb->needs_checkpoint));
272 277
273 out += snprintf(buf + out, len - out, 278 out += snprintf(buf + out, len - out,
274 "%10s => State: %d NumTxns: %d TxnId: %lu\n", 279 "%10s => State: %d TxnId: %lu NumTxns: %d\n",
275 "Journal", osb->journal->j_state, 280 "Journal", osb->journal->j_state,
276 atomic_read(&osb->journal->j_num_trans), 281 osb->journal->j_trans_id,
277 osb->journal->j_trans_id); 282 atomic_read(&osb->journal->j_num_trans));
278 283
279 out += snprintf(buf + out, len - out, 284 out += snprintf(buf + out, len - out,
280 "%10s => GlobalAllocs: %d LocalAllocs: %d " 285 "%10s => GlobalAllocs: %d LocalAllocs: %d "
@@ -302,7 +307,6 @@ static int ocfs2_osb_dump(struct ocfs2_super *osb, char *buf, int len)
302 307
303 out += snprintf(buf + out, len - out, "%10s => %3s %10s\n", 308 out += snprintf(buf + out, len - out, "%10s => %3s %10s\n",
304 "Slots", "Num", "RecoGen"); 309 "Slots", "Num", "RecoGen");
305
306 for (i = 0; i < osb->max_slots; ++i) { 310 for (i = 0; i < osb->max_slots; ++i) {
307 out += snprintf(buf + out, len - out, 311 out += snprintf(buf + out, len - out,
308 "%10s %c %3d %10d\n", 312 "%10s %c %3d %10d\n",