btrfs: remove btrfs_fs_info::stripesize

Btrfs does not support variable stripe length yet, all RAID0/5/6/10
chunks have the fixed stripe length 64K for now.

Furthermore, btrfs_fs_info::stripesize is not the real chunk stripe
length, it's always the same value as sectorsize.

Remove btrfs_fs_info::stripesize, and for the only callsite utilizing
that member, replace it with fs_info->sectorsize instead.

Signed-off-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
Qu Wenruo 2026-06-24 13:53:28 +09:30 committed by David Sterba
parent f1df52e323
commit 49a75e200d
3 changed files with 1 additions and 6 deletions

View File

@ -2905,7 +2905,6 @@ void btrfs_init_fs_info(struct btrfs_fs_info *fs_info)
fs_info->nodesize = 4096;
fs_info->sectorsize = 4096;
fs_info->sectorsize_bits = ilog2(4096);
fs_info->stripesize = 4096;
/* Default compress algorithm when user does -o compress */
fs_info->compress_type = BTRFS_COMPRESS_ZLIB;
@ -3355,7 +3354,6 @@ int __cold open_ctree(struct super_block *sb, struct btrfs_fs_devices *fs_device
{
u32 sectorsize;
u32 nodesize;
u32 stripesize;
u64 generation;
u16 csum_type;
struct btrfs_super_block *disk_super;
@ -3464,7 +3462,6 @@ int __cold open_ctree(struct super_block *sb, struct btrfs_fs_devices *fs_device
/* Set up fs_info before parsing mount options */
nodesize = btrfs_super_nodesize(disk_super);
sectorsize = btrfs_super_sectorsize(disk_super);
stripesize = sectorsize;
fs_info->dirty_metadata_batch = nodesize * (1 + ilog2(nr_cpu_ids));
fs_info->delalloc_batch = sectorsize * 512 * (1 + ilog2(nr_cpu_ids));
@ -3483,7 +3480,6 @@ int __cold open_ctree(struct super_block *sb, struct btrfs_fs_devices *fs_device
else
fs_info->block_max_order = calc_block_max_order(fs_info->sectorsize_bits);
fs_info->csums_per_leaf = BTRFS_MAX_ITEM_SIZE(fs_info) / fs_info->csum_size;
fs_info->stripesize = stripesize;
fs_info->fs_devices->fs_info = fs_info;
if (fs_info->sectorsize > PAGE_SIZE)

View File

@ -4757,7 +4757,7 @@ static noinline int find_free_extent(struct btrfs_root *root,
/* Checks */
ffe_ctl->search_start = round_up(ffe_ctl->found_offset,
fs_info->stripesize);
fs_info->sectorsize);
/* move on to the next group */
if (ffe_ctl->search_start + ffe_ctl->num_bytes >

View File

@ -890,7 +890,6 @@ struct btrfs_fs_info {
u32 sectorsize_bits;
u32 block_min_order;
u32 block_max_order;
u32 stripesize;
u32 writeback_bio_size;
u32 csum_size;
u32 csums_per_leaf;