Please note that IOCB_ATOMIC is not supported for buffered IO, so weOops. I see now.
can't do this - we only support direct IO today.
And supporting buffered IO has its challenges; how to handle overlappingHow about the combination of RWF_ATOMIC | RWF_UNCACHED [1]
atomic writes of differing sizes sitting in the page cache is the main
issue which comes to mind.
Would it be easier/possible to support this considering that the write of folio
is started before the write system call returns?
Note that application that desires mutithreaded atomicity of writes vs. reads
will only need to opt-in for RWF_ATOMIC | RWF_UNCACHED writes, so this
is not expected to actually break its performance by killing the read caching.
Thanks,
Amir.
[1]https://urldefense.com/v3/__https://lore.kernel.org/linux- fsdevel/20241220154831.1086649-1-axboe@xxxxxxxxx/__;!!ACWV5N9M2RV99hQ! J7_5N_kSixl5iSy8IX37Cup3uKTHAaC5Oy-RlvsJeTE2kr3iJ2IXNww_rApK7TwI_ocCBSE- G2vZSKSRHqY$