Re: [PATCH] btrfs: use correct type for sectorsize/nodesize/blocksize
David Sterba <[email protected]>
| Newsgroups | org.kernel.vger.linux-btrfs |
|---|---|
| Message-ID | <[email protected]> |
On Wed, Jun 24, 2026 at 01:42:42PM +0930, Qu Wenruo wrote: > Btrfs' nodesize and sectorsize are all u32 values, there is no need to > use u64 for local usage. > > Furthermore some call sites also use "blocksize" or "bs" for sectorsize, > also change them to use the minimal type u32 instead. > > Since we're here, also reorder those local variables so that they won't > cause extra holes for stack memory, and consitify the > sectorsize/nodesize/blocksize/bs usage. The placement of local variables on stack may be different from the order in the source file (unlike for structures). Some variables are in registers and the same memory can be reused for multiple variables if their live range does not overlap. We don't need to optimize that.