On Fri 22-08-25 18:57:08, Ritesh Harjani wrote:
Keith Busch [off-list ref] writes:
quoted
From: Keith Busch <kbusch@kernel.org>
Previous version:
https://lore.kernel.org/linux-block/20250805141123.332298-1-kbusch@meta.com/ (local)
This series removes the direct io requirement that io vector lengths
align to the logical block size.
I tested this on a few raw block device types including nvme,
virtio-blk, ahci, and loop. NVMe is the only one I tested with 4k
logical sectors; everything else was 512.
On each of those, I tested several iomap filesystems: xfs, ext4, and
btrfs. I found it interesting that each behave a little
differently with handling invalid vector alignments:
- XFS is the most straight forward and reports failures on invalid
vector conditions, same as raw blocks devices.
- EXT4 falls back to buffered io for writes but not for reads.
++linux-ext4 to get any historical context behind why the difference of
behaviour in reads v/s writes for EXT4 DIO.
Hum, how did you test? Because in the basic testing I did (with vanilla
kernel) I get EINVAL when doing unaligned DIO write in ext4... We should be
falling back to buffered IO only if the underlying file itself does not
support any kind of direct IO.
Honza
--
Jan Kara [off-list ref]
SUSE Labs, CR