diff options
author | Srinivas Eeda <srinivas.eeda@oracle.com> | 2009-06-03 20:02:56 -0400 |
---|---|---|
committer | Joel Becker <joel.becker@oracle.com> | 2009-06-03 22:14:31 -0400 |
commit | 15633a220ffe74fc61bc8117e6a89a494011ea3d (patch) | |
tree | 18bf3b92b4ec3988f78c5e07b1471b8f89a2f474 /fs/ocfs2/super.c | |
parent | 83273932fbefb6ceef9c0b82ac4d23900728f4d9 (diff) |
ocfs2 patch to track delayed orphan scan timer statistics
Patch to track delayed orphan scan timer statistics.
Modifies ocfs2_osb_dump to print the following:
Orphan Scan=> Local: 10 Global: 21 Last Scan: 67 seconds ago
Signed-off-by: Srinivas Eeda <srinivas.eeda@oracle.com>
Signed-off-by: Joel Becker <joel.becker@oracle.com>
Diffstat (limited to 'fs/ocfs2/super.c')
-rw-r--r-- | fs/ocfs2/super.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/fs/ocfs2/super.c b/fs/ocfs2/super.c index 44ac27e2d1f5..d05f3caec410 100644 --- a/fs/ocfs2/super.c +++ b/fs/ocfs2/super.c | |||
@@ -208,6 +208,7 @@ static int ocfs2_osb_dump(struct ocfs2_super *osb, char *buf, int len) | |||
208 | int i; | 208 | int i; |
209 | struct ocfs2_cluster_connection *cconn = osb->cconn; | 209 | struct ocfs2_cluster_connection *cconn = osb->cconn; |
210 | struct ocfs2_recovery_map *rm = osb->recovery_map; | 210 | struct ocfs2_recovery_map *rm = osb->recovery_map; |
211 | struct ocfs2_orphan_scan *os; | ||
211 | 212 | ||
212 | out += snprintf(buf + out, len - out, | 213 | out += snprintf(buf + out, len - out, |
213 | "%10s => Id: %-s Uuid: %-s Gen: 0x%X Label: %-s\n", | 214 | "%10s => Id: %-s Uuid: %-s Gen: 0x%X Label: %-s\n", |
@@ -309,6 +310,13 @@ static int ocfs2_osb_dump(struct ocfs2_super *osb, char *buf, int len) | |||
309 | i, osb->slot_recovery_generations[i]); | 310 | i, osb->slot_recovery_generations[i]); |
310 | } | 311 | } |
311 | 312 | ||
313 | os = &osb->osb_orphan_scan; | ||
314 | out += snprintf(buf + out, len - out, "Orphan Scan=> "); | ||
315 | out += snprintf(buf + out, len - out, "Local: %u Global: %u ", | ||
316 | os->os_count, os->os_seqno); | ||
317 | out += snprintf(buf + out, len - out, " Last Scan: %lu seconds ago\n", | ||
318 | (get_seconds() - os->os_scantime.tv_sec)); | ||
319 | |||
312 | return out; | 320 | return out; |
313 | } | 321 | } |
314 | 322 | ||