[CC += Ted] Hi, On 2026-04-22T12:37:43+0200, Zeno Endemann wrote: > Hi, > > Currently, the documentation of stx_blksize in statx says: > > > The "preferred" block size for efficient filesystem I/O. > > (Writing to a file in smaller chunks may cause an > > inefficient read-modify-rewrite.) > > I believe this is misleading; For ext4 this field is set > to the ext4 block size, but in that context "block size" > refers to the "smallest allocation unit" (which is chosen > at file system creation time, see the mkfs.ext4 -b option) > and not the most efficient I/O size that avoids the need > for read-modify-rewrite. > > At least to my understanding, to avoid such a read-modify- > rewrite you rather want to do writes in multiples of the > page size (i.e. sysconf(PAGESIZE)), since that is the unit > the page cache operates on. > > While in many cases ext4 will have a block size equal to > the page size, I think it is strictly better to use the > page size directly for that purpose. Or am I mistaken? I don't know. You should CC someone expert about file systems when asking fs questions. Have a lovely day! Alex --