]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
btrfs: zoned: requeue to unused block group list if zone finish failed
authorNaohiro Aota <naohiro.aota@wdc.com>
Sun, 29 Jun 2025 14:18:29 +0000 (23:18 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Aug 2025 16:36:30 +0000 (18:36 +0200)
commit549b82507d06c976cee59acfbaf3545f1d183f56
treebabe0fec68b1650b94006a461acaea9bbec5ba8a
parent9d93174eb2831a5c3ede25c4f3b3d2b06067c802
btrfs: zoned: requeue to unused block group list if zone finish failed

commit 62be7afcc13b2727bdc6a4c91aefed6b452e6ecc upstream.

btrfs_zone_finish() can fail for several reason. If it is -EAGAIN, we need
to try it again later. So, put the block group to the retry list properly.

Failing to do so will keep the removable block group intact until remount
and can causes unnecessary ENOSPC.

Fixes: 74e91b12b115 ("btrfs: zoned: zone finish unused block group")
CC: stable@vger.kernel.org # 6.1+
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Naohiro Aota <naohiro.aota@wdc.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/btrfs/block-group.c