On 04/10/2024 13:34, Christoph Hellwig wrote:
On Fri, Oct 04, 2024 at 09:22:49AM +0000, John Garry wrote:
Currently FMODE_CAN_ATOMIC_WRITE is set if the bdev can atomic write and
the file is open for direct IO. This does not work if the file is not
opened for direct IO, yet fcntl(O_DIRECT) is used on the fd later.
This sound like a bug fix for 6.12-rc?
The worse that can happen is that a RWF_ATOMIC would be rejected for
scenario described (with using fcntl(O_DIRECT)).
But you are right, it is a fix really. I would need to add patch 1/8 as
well, as it provides the iocb pointer needed.
I'll mark them both as fixes then.
The fix looks good to me:
Reviewed-by: Christoph Hellwig <hch@xxxxxx>
cheers