Patchwork [12/35,v3] debugfs: make stat cmd support inline data

login
register
mail settings
Submitter Zheng Liu
Date July 1, 2012, 1:48 p.m.
Message ID <1341150538-32047-13-git-send-email-wenqing.lz@taobao.com>
Download mbox | patch
Permalink /patch/168408/
State Superseded
Headers show

Comments

Zheng Liu - July 1, 2012, 1:48 p.m.
From: Zheng Liu <wenqing.lz@taobao.com>

It only tells the user that this inode contains inline data.

Signed-off-by: Zheng Liu <wenqing.lz@taobao.com>
---
 debugfs/debugfs.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

Patch

diff --git a/debugfs/debugfs.c b/debugfs/debugfs.c
index 76c0867..14092e0 100644
--- a/debugfs/debugfs.c
+++ b/debugfs/debugfs.c
@@ -836,7 +836,9 @@  void internal_dump_inode(FILE *out, const char *prefix,
 		fprintf(out, "%sDevice major/minor number: %02d:%02d (hex %02x:%02x)\n",
 			devnote, major, minor, major, minor);
 	} else if (do_dump_blocks) {
-		if (inode->i_flags & EXT4_EXTENTS_FL)
+		if (inode->i_flags & EXT4_INLINE_DATA_FL)
+			fprintf(out, "Inode has inline data\n");
+		else if (inode->i_flags & EXT4_EXTENTS_FL)
 			dump_extents(out, prefix, inode_num,
 				     DUMP_LEAF_EXTENTS|DUMP_NODE_EXTENTS, 0, 0);
 		else