diff options
author | Johannes Thumshirn <johannes.thumshirn@wdc.com> | 2021-10-14 18:39:02 +0900 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2021-10-26 19:08:07 +0200 |
commit | 2ca0ec770c62b32c798cdb548f8ea291e4cf3a9e (patch) | |
tree | e4623302dab0267b646a145fd4ace9c39d808d41 /fs/btrfs/subpage.h | |
parent | 813ebc164e8733ed2b98dd25850a06d0dc8026f8 (diff) |
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/subpage.h')
0 files changed, 0 insertions, 0 deletions