diff options
author | Stefan Behrens <sbehrens@giantdisaster.de> | 2012-05-25 10:06:09 -0400 |
---|---|---|
committer | Josef Bacik <josef@redhat.com> | 2012-05-30 10:23:40 -0400 |
commit | c11d2c236cc260b36ef644700fbe99bcc7e7da33 (patch) | |
tree | e240721e0b6e5784177ac39bc299db4063b93c72 /fs/btrfs/volumes.h | |
parent | 442a4f6308e694e0fa6025708bd5e4e424bbf51c (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.h | 3 |
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); |
291 | void btrfs_dev_stat_print_on_error(struct btrfs_device *device); | 291 | void btrfs_dev_stat_print_on_error(struct btrfs_device *device); |
292 | void btrfs_dev_stat_inc_and_print(struct btrfs_device *dev, int index); | 292 | void btrfs_dev_stat_inc_and_print(struct btrfs_device *dev, int index); |
293 | int btrfs_get_dev_stats(struct btrfs_root *root, | ||
294 | struct btrfs_ioctl_get_dev_stats *stats, | ||
295 | int reset_after_read); | ||
293 | 296 | ||
294 | static inline void btrfs_dev_stat_inc(struct btrfs_device *dev, | 297 | static inline void btrfs_dev_stat_inc(struct btrfs_device *dev, |
295 | int index) | 298 | int index) |