diff options
author | 2025-07-16 16:59:54 +0900 | |
---|---|---|
committer | 2025-08-13 12:28:52 +0200 | |
commit | 5c4b93f4c8e5c53574c1a48d66a27a2c68b414af (patch) | |
tree | 21d785e048325e93a86670dacb1b0b5c03ed3a17 /rust/pin-init/internal/src | |
parent | btrfs: zoned: fix data relocation block group reservation (diff) | |
download | wireguard-linux-5c4b93f4c8e5c53574c1a48d66a27a2c68b414af.tar.xz wireguard-linux-5c4b93f4c8e5c53574c1a48d66a27a2c68b414af.zip |
btrfs: zoned: fix write time activation failure for metadata block group
Since commit 13bb483d32ab ("btrfs: zoned: activate metadata block group on
write time"), we activate a metadata block group at the write time. If the
zone capacity is small enough, we can allocate the entire region before the
first write. Then, we hit the btrfs_zoned_bg_is_full() in
btrfs_zone_activate() and the activation fails.
For a data block group, we activate it at the allocation time and we should
check the fullness condition in the caller side. Add, a WARN to check the
fullness condition.
For a metadata block group, we don't need the fullness check because we
activate it at the write time. Instead, activating it once it is written
should be invalid. Catch that with a WARN too.
Fixes: 13bb483d32ab ("btrfs: zoned: activate metadata block group on write time")
CC: stable@vger.kernel.org # 6.6+
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>
Diffstat (limited to 'rust/pin-init/internal/src')
0 files changed, 0 insertions, 0 deletions