Re: [PATCH] bdev: do not report a statx block size below the block size
From: Christian Brauner
Date: Wed Nov 18 2026 - 07:43:14 EST
On Thu, 12 Nov 2026 12:48:05 -0500, Hengyu Liang wrote:
> Commit 425fbcd62d2e ("bdev: use bdev_io_min() for statx block size")
> made stat() report the minimum I/O size of a block device as
> st_blksize, so that devices with a large minimum I/O size get large
> enough I/O. Commit 777d0961ff95 ("fs: move the bdex_statx call to
> vfs_getattr_nosec") did the same for fstat().
>
> However, the minimum I/O size of most disks is 512 bytes, and
> st_blksize was 4096 for them before. As of now, programs that size
> their buffer by st_blksize, such as stdio, write to these disks 512
> bytes at a time. Each write that covers only part of a block makes the
> kernel read the block from the disk first.
>
> [...]
Applied to the vfs.fixes branch of the vfs/vfs.git tree.
Patches in the vfs.fixes branch should appear in linux-next soon.
Please report any outstanding bugs that were missed during review in a
new review to the original patch series allowing us to drop it.
It's encouraged to provide Acked-bys and Reviewed-bys even though the
patch has now been applied. If possible patch trailers will be updated.
Note that commit hashes shown below are subject to change due to rebase,
trailer updates or similar. If in doubt, please check the listed branch.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git
branch: vfs.fixes
[1/1] bdev: do not report a statx block size below the block size
https://git.kernel.org/vfs/vfs/c/085dfb5a71d7