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 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.

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.

[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