From df0bb2f1d20490d8625ff1b6bafe9bc5c556b4a6 Mon Sep 17 00:00:00 2001 From: Qu Wenruo Date: Fri, 19 Jun 2015 11:49:19 +0800 Subject: 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 Signed-off-by: David Sterba --- print-tree.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'print-tree.c') diff --git a/print-tree.c b/print-tree.c index df63334f..a72a979f 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), -- cgit v1.2.3