aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/ctree.h
diff options
context:
space:
mode:
authorDennis Zhou <dennis@kernel.org>2020-01-02 16:26:41 -0500
committerDavid Sterba <dsterba@suse.com>2020-01-20 16:41:00 +0100
commit9ddf648f9c2a492cef4e41e31c50515a817d0562 (patch)
tree64ecae153d63e8392660d0e73e5d99391010795b /fs/btrfs/ctree.h
parentbtrfs: only keep track of data extents for async discard (diff)
downloadlinux-dev-9ddf648f9c2a492cef4e41e31c50515a817d0562.tar.xz
linux-dev-9ddf648f9c2a492cef4e41e31c50515a817d0562.zip
btrfs: keep track of discard reuse stats
Keep track of how much we are discarding and how often we are reusing with async discard. The discard_*_bytes values don't need any special protection because the work item provides the single threaded access. Reviewed-by: Josef Bacik <josef@toxicpanda.com> Signed-off-by: Dennis Zhou <dennis@kernel.org> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/ctree.h')
-rw-r--r--fs/btrfs/ctree.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index 486b9d1532eb..569931dd0ce5 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -473,6 +473,9 @@ struct btrfs_discard_ctl {
unsigned long delay;
u32 iops_limit;
u32 kbps_limit;
+ u64 discard_extent_bytes;
+ u64 discard_bitmap_bytes;
+ atomic64_t discard_bytes_saved;
};
/* delayed seq elem */