aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/volumes.h
diff options
context:
space:
mode:
authorStefan Behrens <sbehrens@giantdisaster.de>2012-05-25 10:06:09 -0400
committerJosef Bacik <josef@redhat.com>2012-05-30 10:23:40 -0400
commitc11d2c236cc260b36ef644700fbe99bcc7e7da33 (patch)
treee240721e0b6e5784177ac39bc299db4063b93c72 /fs/btrfs/volumes.h
parent442a4f6308e694e0fa6025708bd5e4e424bbf51c (diff)
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 193b2835e6ae..6798f8674b13 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,
290 u64 logical, int mirror_num); 290 u64 logical, int mirror_num);
291void btrfs_dev_stat_print_on_error(struct btrfs_device *device); 291void btrfs_dev_stat_print_on_error(struct btrfs_device *device);
292void btrfs_dev_stat_inc_and_print(struct btrfs_device *dev, int index); 292void btrfs_dev_stat_inc_and_print(struct btrfs_device *dev, int index);
293int btrfs_get_dev_stats(struct btrfs_root *root,
294 struct btrfs_ioctl_get_dev_stats *stats,
295 int reset_after_read);
293 296
294static inline void btrfs_dev_stat_inc(struct btrfs_device *dev, 297static inline void btrfs_dev_stat_inc(struct btrfs_device *dev,
295 int index) 298 int index)