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

From: Tal Zussman

Date: Tue Sep 29 2026 - 05:15:05 EST


On 9/25/26 9:37 AM, John Garry wrote:
> 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!
>

No problem, I already have a reproducer so it's easy enough. I'll send
it in the next couple of days.