]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Aug 2025 16:41:38 +0000 (18:41 +0200)
commit2010916a2c0ddc48f29c0197fb856ff834ee347b
treed5b09a67ce50601e59b25a1764f57f1c8fbdaec5
parentd27e3b2b7493efac807b5b8d43e1cd8d86473ad2
btrfs: zoned: reserve data_reloc block group on mount

commit 694ce5e143d67267ad26b04463e790a597500b00 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/btrfs/disk-io.c
fs/btrfs/zoned.c
fs/btrfs/zoned.h