]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
btrfs: zoned: don't fail mount needlessly due to too many active zones
authorJohannes Thumshirn <johannes.thumshirn@wdc.com>
Thu, 18 Sep 2025 10:51:19 +0000 (12:51 +0200)
committerDavid Sterba <dsterba@suse.com>
Tue, 23 Sep 2025 09:22:21 +0000 (11:22 +0200)
commit53de7ee4e28f6e866ac319b9db6e6c1b05664c32
tree500bbf28e2bfa3c6a9e834eccd29d371bb05d1d3
parentb98b208300573f4ab29507f81194a6030b208444
btrfs: zoned: don't fail mount needlessly due to too many active zones

Previously BTRFS did not look at a device's reported max_open_zones limit,
but starting with commit 04147d8394e8 ("btrfs: zoned: limit active zones
to max_open_zones"), zoned BTRFS limited the number of concurrently used
block-groups to the number of max_open_zones a device reported, if it
hadn't already reported a number of max_active_zones.

Starting with commit 04147d8394e8 the number of open zones is treated the
same way as active zones. But this leads to mount failures on filesystems
which have been used before 04147d8394e8 because too many zones are in an
open state.

Ignore the new limitations on these filesystems, so zones can be finished
or evacuated.

Reported-by: Yuwei Han <hrx@bupt.moe>
Link: https://lore.kernel.org/all/2F48A90AF7DDF380+1790bcfd-cb6f-456b-870d-7982f21b5eae@bupt.moe/
Fixes: 04147d8394e8 ("btrfs: zoned: limit active zones to max_open_zones")
Reviewed-by: Naohiro Aota <naohiro.aota@wdc.com>
Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/zoned.c