summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/volumes.h
diff options
context:
space:
mode:
authorStefan Behrens <sbehrens@giantdisaster.de>2012-05-25 16:06:09 +0200
committerJosef Bacik <josef@redhat.com>2012-05-30 10:23:40 -0400
commitc11d2c236cc260b36ef644700fbe99bcc7e7da33 (patch)
treee240721e0b6e5784177ac39bc299db4063b93c72 /fs/btrfs/volumes.h
parent442a4f6308e694e0fa6025708bd5e4e424bbf51c (diff)
downloadop-kernel-dev-c11d2c236cc260b36ef644700fbe99bcc7e7da33.zip
op-kernel-dev-c11d2c236cc260b36ef644700fbe99bcc7e7da33.tar.gz
Btrfs: add ioctl to get and reset the device stats
An ioctl interface is added to get the device statistic counters. A second ioctl is added to atomically get and reset these counters. Signed-off-by: Stefan Behrens <sbehrens@giantdisaster.de>
Diffstat (limited to 'fs/btrfs/volumes.h')
-rw-r--r--fs/btrfs/volumes.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/btrfs/volumes.h b/fs/btrfs/volumes.h
index 193b283..6798f86 100644
--- a/fs/btrfs/volumes.h
+++ b/fs/btrfs/volumes.h
@@ -290,6 +290,9 @@ struct btrfs_device *btrfs_find_device_for_logical(struct btrfs_root *root,
u64 logical, int mirror_num);
void btrfs_dev_stat_print_on_error(struct btrfs_device *device);
void btrfs_dev_stat_inc_and_print(struct btrfs_device *dev, int index);
+int btrfs_get_dev_stats(struct btrfs_root *root,
+ struct btrfs_ioctl_get_dev_stats *stats,
+ int reset_after_read);
static inline void btrfs_dev_stat_inc(struct btrfs_device *dev,
int index)
OpenPOWER on IntegriCloud