]> git.hungrycats.org Git - linux/commit
btrfs: rename btrfs_chunk_map::stripe_size
authorQu Wenruo <wqu@suse.com>
Fri, 16 Oct 2026 00:48:17 +0000 (11:18 +1030)
committerDavid Sterba <dsterba@suse.com>
Mon, 19 Oct 2026 15:07:55 +0000 (17:07 +0200)
commit7d37387b1f29f600e23b363b80c60eeaab2fb552
tree6d14e6c3b16b8aeea8b67696460d2549078190e4
parent8526d9ec572005a11a0fb1198ac72149a70c0baa
btrfs: rename btrfs_chunk_map::stripe_size

The member btrfs_chunk_map::stripe_size sounds very similar to
btrfs_chunk::stripe_len, but they have very different meanings.

btrfs_chunk_map::stripe_size is in fact the device extent size for the
chunk. E.g. a 2GiB RAID0 chunk with 2 stripes,
btrfs_chunk_map::stripe_size will be 1GiB (2GiB / 2).

But btrfs_chunk::stripe_len is the stripe length that striping profiles
should follow, and the value is now fixed to 64KiB.
E.g. for a 2GiB RAID0 chunk with 2 stripes, every write will be split
into 64KiB stripes, and then distributed across the 2 devices.

To avoid confusion, rename btrfs_chunk_map::stripe_size to
dev_extent_size.

And since we're here, also rename the helper btrfs_calc_stripe_length()
to btrfs_calc_dev_extent_size().

Reviewed-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/block-group.c
fs/btrfs/scrub.c
fs/btrfs/tests/extent-map-tests.c
fs/btrfs/volumes.c
fs/btrfs/volumes.h