]> www.infradead.org Git - nvme.git/commit
btrfs: urgent periodic reclaim pass
authorBoris Burkov <boris@bur.io>
Wed, 14 Feb 2024 19:29:50 +0000 (11:29 -0800)
committerDavid Sterba <dsterba@suse.com>
Thu, 11 Jul 2024 13:33:27 +0000 (15:33 +0200)
commit0e962e755b2684185ec37c75d91df56e076782ec
tree9eded06accc737eb78ec019b0a82c85c3a3b0e1a
parent813d4c642251649352e9680e6278a1c02c0ebf95
btrfs: urgent periodic reclaim pass

Periodic reclaim attempts to avoid block_groups seeing active use with a
sweep mark that gets cleared on allocation and set on a sweep. In urgent
conditions where we have very little unallocated space (less than one
chunk used by the threshold calculation for the unallocated target), we
want to be able to override this mechanism.

Introduce a second pass that only happens if we fail to find a reclaim
candidate and reclaim is urgent. In that case, do a second pass where
all block groups are eligible.

Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Boris Burkov <boris@bur.io>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/space-info.c