Re: [PATCH 2/2] iomap: remove the atomic write length check in iomap_dio_bio_iter_one()

From: John Garry

Date: Tue Nov 10 2026 - 03:43:21 EST


On 11/9/26 22:46, Tal Zussman wrote:
What specifically would you want to see tested? I can do an atomic write with
a partially unmapped buffer, with and without stable writes, and check that it
fails and that nothing is written.
Just something similar to the blktests case which you added.

Sounds good, I'll add it to the queue.

Thanks


BTW, have you tested this partially-unmapped case for CoW-based atomics
on xfs? You can just do that by setting atomic_wr=0

Yeah, I just tested it. It behaves as expected: returns -EFAULT with the file
unchanged, both with and without bouncing.

The single-bio check depends on REQ_ATOMIC, which only the HW atomic path sets,
so it doesn't apply to CoW writes, both before and after this series.

In terms of consistency, the unmapped buffer returns -EINVAL on the non-bounce
HW path (from bio_iov_iter_get_pages()) but -EFAULT for all other paths. That
should probably be made consistent across HW and SW and bounce vs. non-bounce,
but that's a separate change.

Yeah, we should fail for the same reason on HW- and CoW-based atomics. I would like if any such rules could be documented and we ensure that both HW- and CoW-based atomics always fail for non-adherence to the rules.

cheers