]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
btrfs: zoned: fix conventional zone capacity calculation
authorNaohiro Aota <naohiro.aota@wdc.com>
Fri, 12 Sep 2025 06:43:21 +0000 (15:43 +0900)
committerDavid Sterba <dsterba@suse.com>
Wed, 5 Nov 2025 19:00:06 +0000 (20:00 +0100)
commit94f54924b96d3565c6b559294b3401b5496c21ac
tree65b3021b09dd3cd8c5dd3348ff1230440f82d744
parent3b1a4a59a2086badab391687a6a0b86e03048393
btrfs: zoned: fix conventional zone capacity calculation

When a block group contains both conventional zone and sequential zone, the
capacity of the block group is wrongly set to the block group's full
length. The capacity should be calculated in btrfs_load_block_group_* using
the last allocation offset.

Fixes: 568220fa9657 ("btrfs: zoned: support RAID0/1/10 on top of raid stripe tree")
CC: stable@vger.kernel.org # v6.12+
Signed-off-by: Naohiro Aota <naohiro.aota@wdc.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/zoned.c