On Thu, May 26, 2022 at 02:32:12PM -0600, Keith Busch wrote: > On Thu, May 26, 2022 at 12:55:50PM -0600, Keith Busch wrote: > > > > Let me see how difficult it would be catch it early in blkdev_dio_aligned(). > > Something like this appears to work: This looks reasonable to me. Nits below: > + if (!iov_iter_aligned(iter, bdev_dma_alignment(bdev), > + bdev_logical_block_size(bdev) - 1)) This probably wants a helper so that it can also be reused by e.g. iomap.