diff options
author | Stefan Behrens <sbehrens@giantdisaster.de> | 2012-05-15 11:30:39 +0200 |
---|---|---|
committer | David Sterba <dsterba@suse.cz> | 2013-01-31 13:47:17 +0100 |
commit | 5b8826ddfd1c4fcdcfe9f78fd80cfeeac9de1b21 (patch) | |
tree | 7eb512fce9566f435d4b05a0b9ea1c70c583f20f /print-tree.c | |
parent | 7a69dc4eecfd52841b11e0f9312f62d17e3479f5 (diff) |
Btrfs-progs: add command to get/reset device stats via ioctl
"btrfs device stats" is used to retrieve and print the device stats.
"btrfs device stats -z" is used to atomically retrieve, reset and
print the stats.
Signed-off-by: Stefan Behrens <sbehrens@giantdisaster.de>
Diffstat (limited to 'print-tree.c')
-rw-r--r-- | print-tree.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/print-tree.c b/print-tree.c index 7c615dd2..828806db 100644 --- a/print-tree.c +++ b/print-tree.c @@ -455,6 +455,9 @@ static void print_key_type(u64 objectid, u8 type) case BTRFS_QGROUP_LIMIT_KEY: printf("BTRFS_QGROUP_LIMIT_KEY"); break; + case BTRFS_DEV_STATS_KEY: + printf("DEV_STATS_ITEM"); + break; default: printf("UNKNOWN.%d", type); }; @@ -777,6 +780,9 @@ 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"); + break; }; fflush(stdout); } |