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>
This commit is contained in:

committed by
David Sterba

parent
dfb79ddb13
commit
5dc7c10b87
@@ -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;
|
||||
|
Reference in New Issue
Block a user