Message ID | 20240515-zoned-gc-v2-2-20c7cb9763cd@kernel.org (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | btrfs: zoned: always set aside a zone for relocation | expand |
diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c index 8b24bb5a0aa1..19ddb0f6fbaa 100644 --- a/fs/btrfs/relocation.c +++ b/fs/btrfs/relocation.c @@ -3811,6 +3811,13 @@ static noinline_for_stack int relocate_block_group(struct reloc_control *rc) ret = btrfs_commit_transaction(trans); if (ret && !err) err = ret; + + /* + * We know we have just freed space, set it as hint for the + * next relocation. + */ + if (!err) + btrfs_reserve_relocation_zone(fs_info); out_free: ret = clean_dirty_subvols(rc); if (ret < 0 && !err)