Re: [PATCH v3 05/13] generic/1226: Add atomic write test using fio crc check verifier

Ojaswin Mujoo
2025-07-22T08:47:40Z

On Thu, Jul 17, 2025 at 03:06:01PM +0100, John Garry wrote:
> On 17/07/2025 14:52, Ojaswin Mujoo wrote:
> > On Thu, Jul 17, 2025 at 02:00:18PM +0100, John Garry wrote:
> > > On 12/07/2025 15:12, Ojaswin Mujoo wrote:
> > > > From: "Ritesh Harjani (IBM)" <ritesh.list@gmail.com>
> > > >
> > > > This adds atomic write test using fio based on it's crc check verifier.
> > > > fio adds a crc for each data block. If the underlying device supports atomic
> > > > write then it is guaranteed that we will never have a mix data from two
> > > > threads writing on the same physical block.
> > >
> > > I think that you should mention that 2-phase approach.
> >
> > Sure I can add a comment and update the commit message with this.
> >
> > >
> > > Is there something which ensures that we have fio which supports RWF_ATOMIC?
> > > fio for some time supported the "atomic" cmdline param, but did not do
> > > anything until recently
> >
> > We do have _require_fio which ensures the options passed are supported
> > by the current fio. If you are saying some versions of fio have --atomic
> > valid but dont do an RWF_ATOMIC then I'm not really sure if that can be
> > caught though.
>
> Can you check the fio version?

We don't have a helper but yes I think that should be possible
>
> >
> > >
> > > >
> > > > Co-developed-by: Ritesh Harjani (IBM) <ritesh.list@gmail.com>
> > > > Signed-off-by: Ritesh Harjani (IBM) <ritesh.list@gmail.com>
> > > > Signed-off-by: Ojaswin Mujoo <ojaswin@linux.ibm.com>
> > > > ---
> > > > tests/generic/1226 | 101 +++++++++++++++++++++++++++++++++++++++++
> > > > tests/generic/1226.out | 2 +
> > >
> > > Was this tested with xfs?
> >
> > Yes, I've tested with XFS with software fallback as well. Also, tested
> > xfs while keeping io size as 16kb so we stress the hw paths too.
>
> so is that requirement implemented with the _require_scratch_write_atomic
> check?

No, its just something i hardcoded for that particular run. This patch
doesn't enforce hardware only atomic writes

Regards,
ojaswin
>
> > Both
> > seem to be passing as expected.
> > >
>
>