summaryrefslogtreecommitdiff
path: root/fs/btrfs/volumes.c
diff options
context:
space:
mode:
authorJohannes Thumshirn <johannes.thumshirn@wdc.com>2021-10-14 12:39:02 +0300
committerDavid Sterba <dsterba@suse.com>2021-10-26 20:08:07 +0300
commit2ca0ec770c62b32c798cdb548f8ea291e4cf3a9e (patch)
treee4623302dab0267b646a145fd4ace9c39d808d41 /fs/btrfs/volumes.c
parent813ebc164e8733ed2b98dd25850a06d0dc8026f8 (diff)
downloadlinux-2ca0ec770c62b32c798cdb548f8ea291e4cf3a9e.tar.xz
btrfs: zoned: use greedy gc for auto reclaim
Currently auto reclaim of unusable zones reclaims the block-groups in the order they have been added to the reclaim list. Change this to a greedy algorithm by sorting the list so we have the block-groups with the least amount of valid bytes reclaimed first. Note: we can't splice the block groups from reclaim_bgs to let the sort happen outside of the lock. The block groups can be still in use by other parts eg. via bg_list and we must hold unused_bgs_lock while processing them. Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Reviewed-by: David Sterba <dsterba@suse.com> [ write note and comment why we can't splice the list ] Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/volumes.c')
0 files changed, 0 insertions, 0 deletions