Re: [PATCH v5 5/9] block: fail a short atomic pin in bio_iov_iter_get_pages()

From: John Garry

Date: Fri Sep 25 2026 - 09:37:23 EST


On 9/24/26 00:56, Tal Zussman wrote:
On a partial page pin, __blkdev_direct_IO_simple() and
__blkdev_direct_IO_async() submit what was pinned with REQ_ATOMIC set
and leave the rest to the buffered fallback, tearing an IOCB_ATOMIC
write.

This can be triggered deterministically. A 16K pwritev2(RWF_ATOMIC)
whose last page is PROT_NONE, on a scsi_debug device with atomic_wr=1,
completes short with only three of the four pages written, violating
RWF_ATOMIC semantics.

I don't mean to load more work, but a blktests case for this would be great. I am consider doing it if you are too busy.

Thanks!