summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQu Wenruo <quwenruo@cn.fujitsu.com>2015-06-19 11:49:19 +0800
committerDavid Sterba <dsterba@suse.cz>2015-06-26 16:47:57 +0200
commitdf0bb2f1d20490d8625ff1b6bafe9bc5c556b4a6 (patch)
treef03690d5a2bebd516f809f0188f0e22f364d6301
parente7d0a023aed0ed4f0d435a10b5e92f9d7fbd4dd7 (diff)
downloadbtrfs-progs-df0bb2f1d20490d8625ff1b6bafe9bc5c556b4a6.tar.gz
btrfs-progs: Add nbytes output for print-tree and reformat inode output
The original implementation doesn't output the nbytes for an inode. Add the output and since the output is too long, reformat it to multi lines. This is very handy to debug related bugs. Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.cz>
-rw-r--r--print-tree.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/print-tree.c b/print-tree.c
index df63334..a72a979 100644
--- a/print-tree.c
+++ b/print-tree.c
@@ -841,10 +841,13 @@ void btrfs_print_leaf(struct btrfs_root *root, struct extent_buffer *l)
switch (type) {
case BTRFS_INODE_ITEM_KEY:
ii = btrfs_item_ptr(l, i, struct btrfs_inode_item);
- printf("\t\tinode generation %llu transid %llu size %llu block group %llu mode %o links %u uid %u gid %u rdev %llu flags 0x%llx\n",
+ printf("\t\tinode generation %llu transid %llu size %llu nbytes %llu\n"
+ "\t\tblock group %llu mode %o links %u uid %u gid %u\n"
+ "\t\trdev %llu flags 0x%llx\n",
(unsigned long long)btrfs_inode_generation(l, ii),
(unsigned long long)btrfs_inode_transid(l, ii),
(unsigned long long)btrfs_inode_size(l, ii),
+ (unsigned long long)btrfs_inode_nbytes(l, ii),
(unsigned long long)btrfs_inode_block_group(l,ii),
btrfs_inode_mode(l, ii),
btrfs_inode_nlink(l, ii),