linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hans Holmberg <Hans.Holmberg@wdc.com>
To: "Darrick J. Wong" <djwong@kernel.org>
Cc: "fstests@vger.kernel.org" <fstests@vger.kernel.org>,
	"zlang@kernel.org" <zlang@kernel.org>,
	"linux-xfs@vger.kernel.org" <linux-xfs@vger.kernel.org>,
	Carlos Maiolino <cem@kernel.org>,
	"david@fromorbit.com" <david@fromorbit.com>, hch <hch@lst.de>
Subject: Re: [PATCH 2/2] xfs: add mount test for read only log devices
Date: Fri, 2 May 2025 11:40:14 +0000	[thread overview]
Message-ID: <3ea7dba6-f552-45a9-ae61-a28ba7f3eda6@wdc.com> (raw)
In-Reply-To: <20250430145211.GL25667@frogsfrogsfrogs>

On 30/04/2025 16:52, Darrick J. Wong wrote:
> On Wed, Apr 30, 2025 at 08:26:00AM +0000, Hans Holmberg wrote:
>> On 28/04/2025 17:58, Darrick J. Wong wrote:
>>> On Mon, Apr 28, 2025 at 12:16:34PM +0000, Hans Holmberg wrote:
>>>> On 25/04/2025 17:05, Darrick J. Wong wrote:
>>>>> ps this test should check
>>>>> that a readonly log device results in a norecovery mount and that
>>>>> pending changes don't show up if the mount succeeds?
>>>>>
>>>>> Also, ext4 supports external log devices, should this be in
>>>>> tests/generic?
>>>>
>>>> Doh!, actually ext4 has a test for this already, ext4/002
>>>> (also based on generic/050)
>>>>
>>>> With my fix, ext4/002 passes for xfs Should/can we turn that into a
>>>> generic test?
>>>
>>> Yeah, it looks like ext4/002 already does most of what you want.  Though
>>> I'd amend it to check that SCRATCH_MNT/00-99 aren't visible in the
>>> norecovery mounts and only appear after recovery actually runs.
>>>
>>
>> So I added this check to ext4/002 and while this works for xfs - the
>> touched files are not visible until log recovery has completed, it does
>> not for ext3/4.
>>
>> For ext3/4 the files are visible after the first successful (norecovery)
>> mount, so even though we did a shutdown, a log recovery does not seem
>> required (dmesg tells me that the log recovery is done in the end after
>> the log device is set back to rw)
>>
>> ..and I presume this is fine - for a generic test can we really assume
>> that a log recovery is required to see the files?
> 
> Nope.  I guess that's an implementation dependent behavior.  TBH I'm not
> even sure we can 100% rely on it for xfs, since it's theoretically
> possible for the log to flush and checkpoint in the very small window
> between the creat and the shutdown call.
> 
> If hoisting ext4/002 to generic works for the three main filesystems
> then I'm fine with just doing that without the extra tests.

Cool, I've submitted a patch to turn ext4 generic.


      reply	other threads:[~2025-05-02 11:40 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-25  9:03 [PATCH 0/2] add read-only logdev/rtdev mount-remount tests Hans Holmberg
2025-04-25  9:03 ` [PATCH 1/2] xfs: add mount test for read only rt devices Hans Holmberg
2025-04-25 15:03   ` Darrick J. Wong
2025-04-29 12:03     ` Hans Holmberg
2025-04-29 14:52       ` Darrick J. Wong
2025-04-30 12:56         ` hch
2025-04-30 14:49           ` Darrick J. Wong
2025-05-07  8:57             ` Hans Holmberg
2025-05-07 10:23               ` Hans Holmberg
2025-04-25  9:03 ` [PATCH 2/2] xfs: add mount test for read only log devices Hans Holmberg
2025-04-25 15:05   ` Darrick J. Wong
2025-04-28 12:16     ` Hans Holmberg
2025-04-28 15:58       ` Darrick J. Wong
2025-04-30  8:26         ` Hans Holmberg
2025-04-30 14:52           ` Darrick J. Wong
2025-05-02 11:40             ` Hans Holmberg [this message]

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=3ea7dba6-f552-45a9-ae61-a28ba7f3eda6@wdc.com \
    --to=hans.holmberg@wdc.com \
    --cc=cem@kernel.org \
    --cc=david@fromorbit.com \
    --cc=djwong@kernel.org \
    --cc=fstests@vger.kernel.org \
    --cc=hch@lst.de \
    --cc=linux-xfs@vger.kernel.org \
    --cc=zlang@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).