]> git.ipfire.org Git - thirdparty/linux.git/commit - fs/btrfs/sysfs.c
btrfs: keep track of discardable_bytes for async discard
authorDennis Zhou <dennis@kernel.org>
Sat, 14 Dec 2019 00:22:21 +0000 (16:22 -0800)
committerDavid Sterba <dsterba@suse.com>
Mon, 20 Jan 2020 15:40:59 +0000 (16:40 +0100)
commit5dc7c10b87474c98116d3438739743cd77263e9f
tree3636b859f5228c8df8d777b2b5a4ec9559510978
parentdfb79ddb130e0a239e3e90aaf5f5b908555f52bb
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>
fs/btrfs/ctree.h
fs/btrfs/discard.c
fs/btrfs/free-space-cache.c
fs/btrfs/free-space-cache.h
fs/btrfs/sysfs.c