summaryrefslogtreecommitdiff
path: root/include/net/aligned_data.h
diff options
context:
space:
mode:
authorNaohiro Aota <naohiro.aota@wdc.com>2025-09-16 11:46:11 +0900
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-11-24 10:37:48 +0100
commit72b3b2e2c6c352ffaba5b9d2ad88c3632a312d65 (patch)
tree39d54f796d565c54c8cc865b4f7c4e7a6962866e /include/net/aligned_data.h
parent8ab9bf9ec20b0bb1bf4235a9dfa7a6a06a21a924 (diff)
btrfs: zoned: fix stripe width calculation
commit 6a1ab50135ce829b834b448ce49867b5210a1641 upstream. 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/net/aligned_data.h')
0 files changed, 0 insertions, 0 deletions