Re: [PATCHv4 5/8] iomap: simplify direct io validity check

Christoph Hellwig
2025-11-04T11:35:40Z

On Mon, Nov 03, 2025 at 11:26:10AM -0700, Keith Busch wrote:
> I've been using these memory alignment capabilities in production for
> quite some time without issue on real hardware, and it's proven very
> useful at reducing memory and cpu utilization because that's really how
> the data alignment comes into the services responisble for running the
> disk io, and the alignment is outside the service's control.
>
> Christoph is testing different use cases with check summing and finding
> much of the infrastructure wasn't ready to accept the more arbitrary
> memory offsets and lengths.

Well, I've mostly just wired up the alignment reporting to the legacy
XFS ioctl, and now xfstests actually tried it. Which found breakage
in the PI code and in null_blk pretty quickly, and I suspect it might
find more in drivers that access the data in software and don't just
DMA map it.