btrfs: track discardable extents for async discard
The number of discardable extents will serve as the rate limiting metric for how often we should discard. This keeps track of discardable extents in the free space caches by maintaining deltas and propagating them to the global count. The deltas are calculated from 2 values stored in PREV and CURR entries, then propagated up to the global discard ctl. The current counter value becomes the previous counter value after update. 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>
parent
e4faab84
Please register or sign in to comment