On 30/08/2025 18:09, Zorro Lang wrote:
I think John has a bit more background but afaict, RWF_ATOMIC support
was added (fio commit: d01612f3ae25) but then removed (commit:
a25ba6c64fe1) since the feature didn't make it to kernel in time.
However the option seemed to be kept in place. Later, commit 40f1fc11d
added the support back in a later version of fio.
So yes, I think there are some version where fio will accept atomic=1
but not act upon it and the tests may start failing with no apparent
reason.
The concern from Darrick might be a problem. May I ask which fio commit
brought in this issue, and which fio commit fixed it? If this issue be
brought in and fixed within a fio release, it might be better. But if it
crosses fio release, that might be bad, then we might be better to have
this helper.
The history is that fio atomic write support was originally added some
time ago for out-of-kernel atomic write support, which was O_ATOMIC
flag. Since O_ATOMIC never made it into the kernel, the feature was
removed, but the plumbing for atomic writes stayed in fio - specifically
the "atomic=" option. So I just reused that plumbing in d01612f3ae25 to
support RWF_ATOMIC.
The point is that we should check the fio version, as different versions
can give different behaviour for "atomic" option, those being:
a. O_ATOMIC (we definitely don't want this)
b. no nothing (bad)
c. use RWF_ATOMIC
Thanks,
John