Re: [PATCH v5 05/10] xfs: Iomap SW-based atomic write support

From: John Garry
Date: Wed Mar 12 2025 - 12:11:40 EST


On 12/03/2025 15:55, Christoph Hellwig wrote:
would make the core iomap code set REQ_ATOMIC on the bio for that
iteration.
but we still need to tell ->iomap_begin about IOCB_ATOMIC, hence
Yeah, ->iomap_begin can't directly look at the iocb.

IOMAP_DIO_BIO_ATOMIC which sets IOMAP_BIO_ATOMIC.
We can't allow __iomap_dio_rw() check IOCB_ATOMIC only (and set
IOMAP_BIO_ATOMIC), as this is the common path for COW and regular atomic
write
Well, I'd imagine __iomap_dio_rw just sets IOMAP_ATOMIC from IOCB_ATOMIC
and then it's up to file system internal state if it wants to set
IOMAP_F_REQ_ATOMIC based on that, i.e. the actual setting of
IOMAP_F_REQ_ATOMIC is fully controlled by the file system and not
by the iomap core.

ok, fine. But I will also need to change ext4 to do the same (in terms of setting IOMAP_F_REQ_ATOMIC).

And I am thinking of IOMAP_F_ATOMIC_BIO as the name, as we mentioned earlier that it is not so nice to with clash block layer names

Thanks,
John