public inbox for fstests@vger.kernel.org
 help / color / mirror / Atom feed
From: Eryu Guan <guaneryu@gmail.com>
To: Amir Goldstein <amir73il@gmail.com>
Cc: "Darrick J. Wong" <darrick.wong@oracle.com>,
	Jeffle Xu <jefflexu@linux.alibaba.com>,
	fstests <fstests@vger.kernel.org>
Subject: Re: [PATCH v2] generic/530: fix shutdown failure of generic/530 in overlay
Date: Fri, 24 May 2019 17:57:31 +0800	[thread overview]
Message-ID: <20190524095731.GO15846@desktop> (raw)
In-Reply-To: <CAOQ4uxjbs_YBoikMpntcPtw==n2+R8HAQk+E3BWN4gt1fXf_kg@mail.gmail.com>

On Mon, May 20, 2019 at 10:29:55PM +0300, Amir Goldstein wrote:
> On Mon, May 20, 2019 at 9:18 PM Darrick J. Wong <darrick.wong@oracle.com> wrote:

> > >  # Unmount to prove that we can clean it all
> > >  echo umount >> $seqres.full
> > > diff --git a/tests/xfs/501 b/tests/xfs/501
> > > index 974f341..4be9997 100755
> > > --- a/tests/xfs/501
> > > +++ b/tests/xfs/501
> > > @@ -54,7 +54,9 @@ ulimit -n $max_files
> > >
> > >  # Open a lot of unlinked files
> > >  echo create >> $seqres.full
> > > -$here/src/t_open_tmpfiles $SCRATCH_MNT shutdown >> $seqres.full
> > > +$here/src/t_open_tmpfiles $SCRATCH_MNT >> $seqres.full
> > > +_scratch_shutdown -f
> >
> > NAK.
> >
> > The whole point of both of these tests is to check the operation of
> > unlinked inode recovery after filesystem failure.  Moving the shutdown
> > call so that it happens after t_open_tmpfiles exits and releases all the
> > fds renders both tests completely broken and pointless.
> >
> > The _require_scratch_shutdown behavior overlayfs (as I was hinting
> > before I left for vacation) is not particularly intuitive, and the next
> > step ought to have been "Ok, the helpers' behavior is intentional and
> > any program that wants to test shutdown has to use a file on the lower
> > fs; how do we pass the necessary control handle to t_open_tmpfiles", not
> > ripping out the offending code without figuring out what the test
> > actually does.
> >
> > IOWS,
> >
> > _scratch_shutdown_handle() {
> >         if [ $FSTYP = "overlayfs" ]; then
> >                 echo "$OVL_BASE_SCRATCH_MNT"
> >         else
> >                 echo "$SCRATCH_MNT"
> >         fi
> > }
> >
> > $here/src/t_open_tmpfiles $SCRATCH_MNT shutdown $(_scratch_shutdown_handle)
> >
> 
> That sounds reasonable to me.
> 
> As a side note, overlayfs doesn't support O_TMPFILE.
> I am not sure if there is any filesystem that doesn't support
> O_TMPFILE which gains
> important coverage from the !try_o_tmpfile code??
> 
> If there isn't, we could just require O_TMPFILE support and be done with that,
> but I guess if we got this far...
> 
> > Oh, it's already upstream, I'll send a revert later <grumble>...
> >
> 
> Hmm, I had a bad feeling about this one.
> I should have said CC-and-wait-for-ack-by Darick.

I should have noticed this on review.. Thanks for the review anyway!

Thanks,
Eryu

  parent reply	other threads:[~2019-05-24  9:57 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-13  6:11 [PATCH v2] generic/530: fix shutdown failure of generic/530 in overlay Jeffle Xu
2019-05-13  8:34 ` Amir Goldstein
2019-05-20 16:28 ` Darrick J. Wong
2019-05-20 19:29   ` Amir Goldstein
2019-05-20 21:34     ` Darrick J. Wong
2019-05-24  9:57     ` Eryu Guan [this message]
  -- strict thread matches above, loose matches on Subject: below --
2019-05-09  5:26 [PATCH] " Jeffle Xu
2019-05-10  3:17 ` [PATCH v2] " Jeffle Xu

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=20190524095731.GO15846@desktop \
    --to=guaneryu@gmail.com \
    --cc=amir73il@gmail.com \
    --cc=darrick.wong@oracle.com \
    --cc=fstests@vger.kernel.org \
    --cc=jefflexu@linux.alibaba.com \
    /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