Re: [PATCH] mkfs: use stx_blksize for dev block size by default

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Feb 07, 2025 at 11:26:20AM -0800, Luis Chamberlain wrote:
> On Thu, Feb 06, 2025 at 02:27:16PM -0800, Darrick J. Wong wrote:
> > NAME                     MIN-IO
> > sda                         512
> > ├─sda1                      512
> > ├─sda2                      512
> > │ └─node0.boot              512
> > ├─sda3                      512
> > │ └─node0.swap              512
> > └─sda4                      512
> >   └─node0.lvm               512
> >     └─node0-root            512
> > sdb                        4096
> > └─sdb1                     4096
> > nvme1n1                     512
> > └─md0                    524288
> >   └─node0.raid           524288
> >     └─node0_raid-storage 524288
> > nvme0n1                     512
> > └─md0                    524288
> >   └─node0.raid           524288
> >     └─node0_raid-storage 524288
> > nvme2n1                     512
> > └─md0                    524288
> >   └─node0.raid           524288
> >     └─node0_raid-storage 524288
> > nvme3n1                     512
> > └─md0                    524288
> >   └─node0.raid           524288
> >     └─node0_raid-storage 524288
> 
> Can you try this for each of these:
> 
> stat --print=%o 
> 
> I believe that without that new patch I posted [0] you will get 4 KiB
> here. Then the blocksize passed won't be the min-io until that patch
> gets applied.

Yes, that returns 4K on 6.13.0 for every device in the list.  I think
you're saying that stat will start returning 512K for the blocksize if
your patch is merged?

> The above is:
> 
> statx(AT_FDCWD, "/dev/nvme0n1", AT_STATX_SYNC_AS_STAT|AT_SYMLINK_NOFOLLOW|AT_NO_AUTOMOUNT, 0,
> {stx_mask=STATX_BASIC_STATS|STATX_MNT_ID, stx_attributes=0,
> stx_mode=S_IFBLK|0660, stx_size=0, ...}) = 0
> 
> So if we use this instead at mkfs, then even older kernels will get 4
> KiB, and if distros want to automatically lift the value at mkfs, they
> could cherry pick that simple patch.

How well does that work if the gold master image creator machine has a
new kernel and a RAID setup, but the kernel written into the gold master
image is something older than a 6.12 kernel?

--D

> 
> [0] https://lkml.kernel.org/r/20250204231209.429356-9-mcgrof@xxxxxxxxxx
> 
>   Luis




[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux