aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/fs/btrfs/tree-log.c
diff options
context:
space:
mode:
authorNaohiro Aota <naohiro.aota@wdc.com>2025-09-16 11:46:11 +0900
committerDavid Sterba <dsterba@suse.com>2025-11-05 20:00:08 +0100
commit6a1ab50135ce829b834b448ce49867b5210a1641 (patch)
tree5ad04e09ae0d4079f28f37306075ae93435cf5f9 /fs/btrfs/tree-log.c
parentbtrfs: zoned: fix conventional zone capacity calculation (diff)
downloadwireguard-linux-6a1ab50135ce829b834b448ce49867b5210a1641.tar.xz
wireguard-linux-6a1ab50135ce829b834b448ce49867b5210a1641.zip
btrfs: zoned: fix stripe width calculation
The stripe offset calculation in the zoned code for raid0 and raid10 wrongly uses map->stripe_size to calculate it. In fact, map->stripe_size is the size of the device extent composing the block group, which always is the zone_size on the zoned setup. Fix it by using BTRFS_STRIPE_LEN and BTRFS_STRIPE_LEN_SHIFT. Also, optimize the calculation a bit by doing the common calculation only once. Fixes: c0d90a79e8e6 ("btrfs: zoned: fix alloc_offset calculation for partly conventional block groups") CC: stable@vger.kernel.org # 6.17+ Signed-off-by: Naohiro Aota <naohiro.aota@wdc.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/tree-log.c')
0 files changed, 0 insertions, 0 deletions