]> git.ipfire.org Git - thirdparty/linux.git/commit
btrfs: zoned: reserve data_reloc block group on mount
authorJohannes Thumshirn <johannes.thumshirn@wdc.com>
Tue, 3 Jun 2025 06:14:01 +0000 (08:14 +0200)
committerDavid Sterba <dsterba@suse.com>
Mon, 21 Jul 2025 21:56:31 +0000 (23:56 +0200)
commit694ce5e143d67267ad26b04463e790a597500b00
tree11ffe502adee32a0914fa5ea79ac3889a8f2b621
parentf1f22dfbea2e834aa81eb8511e2f96583390ef82
btrfs: zoned: reserve data_reloc block group on mount

Create a block group dedicated for data relocation on mount of a zoned
filesystem.

If there is already more than one empty DATA block group on mount, this
one is picked for the data relocation block group, instead of a newly
created one.

This is done to ensure, there is always space for performing garbage
collection and the filesystem is not hitting ENOSPC under heavy overwrite
workloads.

CC: stable@vger.kernel.org # 6.6+
Reviewed-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/disk-io.c
fs/btrfs/zoned.c
fs/btrfs/zoned.h