linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: John Garry <john.g.garry@oracle.com>
To: "Darrick J. Wong" <djwong@kernel.org>
Cc: Catherine Hoang <catherine.hoang@oracle.com>,
	linux-xfs@vger.kernel.org, fstests@vger.kernel.org
Subject: Re: [PATCH 6/6] generic: various atomic write tests with scsi_debug
Date: Wed, 14 May 2025 17:30:05 +0100	[thread overview]
Message-ID: <304e85b4-9c5d-40e7-aced-ec63942da548@oracle.com> (raw)
In-Reply-To: <20250514160143.GW25667@frogsfrogsfrogs>

On 14/05/2025 17:01, Darrick J. Wong wrote:
>> It seems many sub-tests are same as 1222
>>
>> It is difficult to factor them out?
> Yes.  g/1222 will _notrun itself if the scsi_debug module isn't present
> or the fake device cannot be created.  Apparently many of the people who
> run fstests also have test infrastructure that cannot handle modules, so
> they don't run anything involving scsi_debug.

ok...

> 
> That's why g/1223 only requires that the scratch fs advertises some sort
> of atomic write capability, it doesn't care how it provides that.
> 
> <snip>
> 
>>> diff --git a/tests/generic/1224 b/tests/generic/1224
>>> new file mode 100644
>>> index 00000000..fb178be4
>>> --- /dev/null
>>> +++ b/tests/generic/1224

> <snip>

>>
>> But we also test RWF_NOWAIT at some stage?
>>
>> RWF_NOWAIT should fail always for filesystem-based atomic write
> It's hard to test NOWAIT because the selected io path might not actually
> encounter contention, and there are various things that NOWAIT will wait
> on anyway (like memory allocation and metadata reads).

The filesystem-based atomic write will always try to allocate blocks, 
and this will fail for NOWAIT.

But, come to think of it, this is not even a useful test - so forget the 
suggestion. I was just testing this as a sanity check to prove that we 
are getting expected behavior.

> 
> <snip>
> 
> 
>>> diff --git a/tests/xfs/1217 b/tests/xfs/1217
>>> new file mode 100755
>>> index 00000000..012a1f46
>>> --- /dev/null
>>> +++ b/tests/xfs/1217
>>> @@ -0,0 +1,70 @@
>>> +#! /bin/bash
>>> +# SPDX-License-Identifier: GPL-2.0
>>> +# Copyright (c) 2025 Oracle.  All Rights Reserved.
>>> +#
>>> +# FS QA Test 1217
>>> +#
>>> +# Check that software atomic writes can complete an operation after a crash.
>>> +#
>> Could we prove that we get a torn write for a regular non-atomic write also?
> Perhaps?  But I don't see the point -- non-atomic write completions
> could be done atomically.

oh, from my reading of the test, I thought that we were ensuring that we 
are writing over many extents, and so could not be completed atomically 
for a non-atomic write.

BTW, there is a typo in a comment for that test, please see "ssecond block"

Thanks,
John


  reply	other threads:[~2025-05-14 16:30 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-14  0:29 [PATCH 0/6] atomic writes tests Catherine Hoang
2025-05-14  0:29 ` [PATCH 1/6] generic/765: fix a few issues Catherine Hoang
2025-05-14 12:47   ` John Garry
2025-05-14 15:38     ` Darrick J. Wong
2025-05-14 23:42       ` Catherine Hoang
2025-05-15  1:47         ` Darrick J. Wong
2025-05-15  8:16       ` John Garry
2025-05-15 14:54         ` Darrick J. Wong
2025-05-15 17:57           ` John Garry
2025-05-15 21:50             ` Catherine Hoang
2025-05-16  6:59               ` John Garry
2025-05-17  3:17   ` Ritesh Harjani
2025-05-14  0:29 ` [PATCH 2/6] generic/765: adjust various things Catherine Hoang
2025-05-14 12:59   ` John Garry
2025-05-17  3:36   ` Ritesh Harjani
2025-05-14  0:29 ` [PATCH 3/6] generic/765: move common atomic write code to a library file Catherine Hoang
2025-05-14 13:00   ` John Garry
2025-05-17  3:49   ` Ritesh Harjani
2025-05-14  0:29 ` [PATCH 4/6] common/atomicwrites: adjust a few more things Catherine Hoang
2025-05-14 13:11   ` John Garry
2025-05-14 15:40     ` Darrick J. Wong
2025-05-17  3:59   ` Ritesh Harjani
2025-05-14  0:29 ` [PATCH 5/6] common/atomicwrites: fix _require_scratch_write_atomic Catherine Hoang
2025-05-14 13:14   ` John Garry
2025-05-14  0:29 ` [PATCH 6/6] generic: various atomic write tests with scsi_debug Catherine Hoang
2025-05-14 13:41   ` John Garry
2025-05-14 16:01     ` Darrick J. Wong
2025-05-14 16:30       ` John Garry [this message]
2025-05-14 23:49       ` Catherine Hoang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=304e85b4-9c5d-40e7-aced-ec63942da548@oracle.com \
    --to=john.g.garry@oracle.com \
    --cc=catherine.hoang@oracle.com \
    --cc=djwong@kernel.org \
    --cc=fstests@vger.kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).