[Ocfs2-tools-devel] [PATCH 15/22] debugfs.ocfs2: Dump suballoc_loc if exists.

Tao Ma tao.ma at oracle.com
Wed Mar 31 21:41:19 PDT 2010


Signed-off-by: Tao Ma <tao.ma at oracle.com>
---
 debugfs.ocfs2/dump.c |   24 +++++++++++++++++++++---
 1 files changed, 21 insertions(+), 3 deletions(-)

diff --git a/debugfs.ocfs2/dump.c b/debugfs.ocfs2/dump.c
index a78ab02..b2a0e55 100644
--- a/debugfs.ocfs2/dump.c
+++ b/debugfs.ocfs2/dump.c
@@ -295,9 +295,15 @@ void dump_inode(FILE *out, struct ocfs2_dinode *in)
 		strcpy(tmp_str, "Global");
 	else
 		sprintf(tmp_str, "%d", in->i_suballoc_slot);
-	fprintf(out, "\tSub Alloc Slot: %s   Sub Alloc Bit: %u\n",
+	fprintf(out, "\tSub Alloc Slot: %s   Sub Alloc Bit: %u",
 		tmp_str, in->i_suballoc_bit);
 
+	if (in->i_suballoc_loc)
+		fprintf(out, "   Sub Alloc Group %"PRIu64"\n",
+			in->i_suballoc_loc);
+	else
+		fprintf(out, "\n");
+
 	if (in->i_flags & OCFS2_BITMAP_FL)
 		fprintf(out, "\tBitmap Total: %u   Used: %u   Free: %u\n",
 		       in->id1.bitmap1.i_total, in->id1.bitmap1.i_used,
@@ -409,9 +415,15 @@ bail:
  */
 void dump_extent_block (FILE *out, struct ocfs2_extent_block *blk)
 {
-	fprintf (out, "\tSubAlloc Bit: %u   SubAlloc Slot: %u\n",
+	fprintf(out, "\tSubAlloc Bit: %u   SubAlloc Slot: %u",
 		 blk->h_suballoc_bit, blk->h_suballoc_slot);
 
+	if (blk->h_suballoc_loc)
+		fprintf(out, "   SubAlloc Group: %"PRIu64"\n",
+			blk->h_suballoc_loc);
+	else
+		fprintf(out, "\n");
+
 	fprintf (out, "\tBlknum: %"PRIu64"   Next Leaf: %"PRIu64"\n",
 		 (uint64_t)blk->h_blkno, (uint64_t)blk->h_next_leaf_blk);
 
@@ -1047,9 +1059,15 @@ void dump_refcount_block(FILE *out, struct ocfs2_refcount_block *rb)
 {
 	char flags[PATH_MAX];
 
-	fprintf(out, "\tSubAlloc Bit: %u   SubAlloc Slot: %u\n",
+	fprintf(out, "\tSubAlloc Bit: %u   SubAlloc Slot: %u",
 		rb->rf_suballoc_bit, rb->rf_suballoc_slot);
 
+	if (rb->rf_suballoc_loc)
+		fprintf(out, "   SubAlloc Group: %"PRIu64"\n",
+			rb->rf_suballoc_loc);
+	else
+		fprintf(out, "\n");
+
 	fprintf(out, "\tFS Generation: %u (0x%x)\n", rb->rf_fs_generation,
 		rb->rf_fs_generation);
 	fprintf(out, "\tBlknum: %"PRIu64"   Parent: %"PRIu64"\n",
-- 
1.5.5




More information about the Ocfs2-tools-devel mailing list