summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/free-space-cache.h
diff options
context:
space:
mode:
authorDennis Zhou <dennis@kernel.org>2019-12-14 01:22:21 +0100
committerDavid Sterba <dsterba@suse.com>2020-01-20 16:40:59 +0100
commit5dc7c10b87474c98116d3438739743cd77263e9f (patch)
tree3636b859f5228c8df8d777b2b5a4ec9559510978 /fs/btrfs/free-space-cache.h
parentbtrfs: track discardable extents for async discard (diff)
downloadlinux-5dc7c10b87474c98116d3438739743cd77263e9f.tar.xz
linux-5dc7c10b87474c98116d3438739743cd77263e9f.zip
btrfs: keep track of discardable_bytes for async discard
Keep track of this metric so that we can understand how ahead or behind we are in discarding rate. This uses the same accounting method as discardable_extents, deltas between previous/current values and propagating them up. Signed-off-by: Dennis Zhou <dennis@kernel.org> Reviewed-by: David Sterba <dsterba@suse.com> [ update changelog ] Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/free-space-cache.h')
-rw-r--r--fs/btrfs/free-space-cache.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/btrfs/free-space-cache.h b/fs/btrfs/free-space-cache.h
index bd1e7a542271..5018190a49a3 100644
--- a/fs/btrfs/free-space-cache.h
+++ b/fs/btrfs/free-space-cache.h
@@ -52,6 +52,7 @@ struct btrfs_free_space_ctl {
int unit;
u64 start;
s32 discardable_extents[BTRFS_STAT_NR_ENTRIES];
+ s64 discardable_bytes[BTRFS_STAT_NR_ENTRIES];
const struct btrfs_free_space_op *op;
void *private;
struct mutex cache_writeout_mutex;