btrfs-progs: teach print_leaf about permanent item subtypes

[ kernel patch 585a3d0d238dfe42909cb58b0d05f644365fed14 ]
Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
David Sterba 2016-11-01 13:36:58 +01:00
parent 2add123c8e
commit 9da5b472d5
1 changed files with 12 additions and 2 deletions

View File

@ -1222,8 +1222,18 @@ void btrfs_print_leaf(struct btrfs_root *root, struct extent_buffer *l)
str = l->data + btrfs_item_ptr_offset(l, i);
printf("\t\titem data %.*s\n", btrfs_item_size(l, item), str);
break;
case BTRFS_DEV_STATS_KEY:
printf("\t\tdevice stats\n");
case BTRFS_PERSISTENT_ITEM_KEY:
printf("\t\tpersistent item objectid ");
print_objectid(stdout, objectid, BTRFS_PERSISTENT_ITEM_KEY);
printf(" offset %llu\n", (unsigned long long)offset);
switch (objectid) {
case BTRFS_DEV_STATS_OBJECTID:
printf("\t\tdevice stats\n");
break;
default:
printf("\t\tunknown persistent item objectid %llu\n",
objectid);
}
break;
};
fflush(stdout);