• Boris Burkov's avatar
    btrfs: urgent periodic reclaim pass · 0e962e75
    Boris Burkov authored
    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: default avatarJosef Bacik <josef@toxicpanda.com>
    Signed-off-by: default avatarBoris Burkov <boris@bur.io>
    Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
    0e962e75
space-info.c 65.9 KB