Re: [PATCH] btrfs: remove btrfs_fs_info::stripesize
Qu Wenruo <[email protected]>
| Newsgroups | org.kernel.vger.linux-btrfs |
|---|---|
| Message-ID | <[email protected]> |
在 2026/6/25 01:03, David Sterba 写道: > On Wed, Jun 24, 2026 at 01:53:28PM +0930, Qu Wenruo wrote: >> Btrfs does not support variable stripe length yet, all RAID0/5/6/10 >> chunks have the fixed stripe length 64K for now. > > The question is if the 'for now' will turn into configurable stripe size > in the future. This was the plan, but long time ago. I think we can > remove it anyway, the code is no-op and adding proper support would need > more changes that just that. I'm already working on the per-chunk stripe length. But even with that feature, we're going to respect per-chunk stripe length, not the global one. So the existing naming "stripesize" doesn't even make any sense. > >> 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 <[email protected]> > > Reviewed-by: David Sterba <[email protected]> > >> --- a/fs/btrfs/extent-tree.c >> +++ b/fs/btrfs/extent-tree.c >> @@ -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); > > This seems to be the only relevant use in case the stripe size would not > be equal to sector size. > I think we can even remove this one. As the extent tree should always have everything block aligned. Thanks, Qu