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)
committerDavid Sterba <dsterba@suse.com>
Mon, 21 Jul 2025 22:09:23 +0000 (00:09 +0200)
commit62be7afcc13b2727bdc6a4c91aefed6b452e6ecc
tree095d7bd501b6cba8a5790ca853a7c8ff27c24340
parent3061801420469610c8fa6080a950e56770773ef1
btrfs: zoned: requeue to unused block group list if zone finish failed

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>
fs/btrfs/block-group.c