summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorDennis Zhou <dennis@kernel.org>2019-12-13 16:22:12 -0800
committerDavid Sterba <dsterba@suse.com>2020-01-20 16:40:57 +0100
commita7ccb255852413dd59263e551fd0ef13f76fc9b9 (patch)
treed3b953699eb4cc2d4062f91e1e966bf2870a031f /arch
parent46b27f5059e6ce7a7e3805d53144b37897723e3b (diff)
btrfs: keep track of which extents have been discarded
Async discard will use the free space cache as backing knowledge for which extents to discard. This patch plumbs knowledge about which extents need to be discarded into the free space cache from unpin_extent_range(). An untrimmed extent can merge with everything as this is a new region. Absorbing trimmed extents is a tradeoff to for greater coalescing which makes life better for find_free_extent(). Additionally, it seems the size of a trim isn't as problematic as the trim io itself. When reading in the free space cache from disk, if sync is set, mark all extents as trimmed. The current code ensures at transaction commit that all free space is trimmed when sync is set, so this reflects that. 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 'arch')
0 files changed, 0 insertions, 0 deletions