On Tue, May 14, 2019 at 10:27:17PM +0800, Ming Lei wrote: > I am wondering if it can be done easily, given mkfs is userspace > which only calls write syscall on block device. Or could you share > something about how to fix the stupid things? mkfs.ext4 at least uses buffered I/O on the block device. And the block device uses the really old buffer head based address_space ops, which will submit one bio per buffer_head, that is per logic block. mkfs probably writes much larger sizes than that.. > > nr_phys_segments that mirrors what is in the request, fixing bugs > > in a few drivers, and allowing for follow on patches that significantly > > simplify our I/O path. > > non-gap device still has max segment size limit, and I guess it still > needs to be respected. It is still respected. It might just disallow some merges we could theoretically allow.