[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3a4854ac-75ad-4783-acbd-048fe7c7fdb0@oracle.com>
Date: Mon, 28 Jul 2025 15:00:40 +0100
From: John Garry <john.g.garry@...cle.com>
To: Ojaswin Mujoo <ojaswin@...ux.ibm.com>
Cc: Zorro Lang <zlang@...hat.com>, fstests@...r.kernel.org,
Ritesh Harjani <ritesh.list@...il.com>, djwong@...nel.org,
tytso@....edu, linux-xfs@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-ext4@...r.kernel.org
Subject: Re: [PATCH v3 05/13] generic/1226: Add atomic write test using fio
crc check verifier
On 28/07/2025 14:35, Ojaswin Mujoo wrote:
>> We guarantee that the write is committed all-or-nothing, but do rely on
>> userspace not issuing racing atomic writes or racing regular writes.
>>
>> I can easily change this, as I mentioned, but I am not convinced that it is
>> a must.
> Purely from a design point of view, I feel we are breaking atomicity and
> hence we should serialize or just stop userspace from doing this (which
> is a bit extreme).
If you check the man page description of RWF_ATOMIC, it does not mention
serialization. The user should conclude that usual direct IO rules
apply, i.e. userspace is responsible for serializing.
>
> I know userspace should ideally not do overwriting atomic writes but if
> it is something we are allowing (which we do) then it is
> kernel's responsibility to ensure atomicity. Sure we can penalize them
> by serializing the writes but not by tearing it.
>
> With that reasoning, I don't think the test should accomodate for this
> particular scenario.
I can send a patch to the community for xfs (to provide serialization),
like I showed earlier, to get opinion.
Thanks,
John
Powered by blists - more mailing lists