From 5b8826ddfd1c4fcdcfe9f78fd80cfeeac9de1b21 Mon Sep 17 00:00:00 2001 From: Stefan Behrens Date: Tue, 15 May 2012 11:30:39 +0200 Subject: 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 --- print-tree.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'print-tree.c') 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); } -- cgit v1.2.3