diff options
author | Dennis Zhou <dennis@kernel.org> | 2020-01-02 16:26:41 -0500 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2020-01-20 16:41:00 +0100 |
commit | 9ddf648f9c2a492cef4e41e31c50515a817d0562 (patch) | |
tree | 64ecae153d63e8392660d0e73e5d99391010795b /fs/btrfs/ctree.h | |
parent | 5cb0724e1b4653629c508906ca6098bae77d2f95 (diff) | |
download | linux-9ddf648f9c2a492cef4e41e31c50515a817d0562.tar.bz2 |
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.h | 3 |
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 */ |