linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "J. Bruce Fields" <bfields@fieldses.org>
To: Eryu Guan <eguan@redhat.com>
Cc: Andreas Dilger <adilger@dilger.ca>,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>,
	fstests@vger.kernel.org,
	Linux NFS Mailing List <linux-nfs@vger.kernel.org>
Subject: Re: [PATCH 2/2] dirstress: Allow ESTALE as well as ENOENT
Date: Tue, 29 Nov 2016 09:34:51 -0500	[thread overview]
Message-ID: <20161129143451.GA6504@fieldses.org> (raw)
In-Reply-To: <20161129064306.GL22989@eguan.usersys.redhat.com>

On Tue, Nov 29, 2016 at 02:43:06PM +0800, Eryu Guan wrote:
> On Fri, Nov 25, 2016 at 08:39:39PM -0500, J. Bruce Fields wrote:
> > From: "J. Bruce Fields" <bfields@redhat.com>
> > 
> > In the NFS case an attempt to chdir out of a removed directory could result
> > in ESTALE, and that should not cause the test to fail.
> > 
> > This was causing intermittent failures on generic/011 on NFS.
> > 
> > Signed-off-by: J. Bruce Fields <bfields@redhat.com>
> > ---
> >  src/dirstress.c | 12 ++++++++----
> >  1 file changed, 8 insertions(+), 4 deletions(-)
> > 
> > diff --git a/src/dirstress.c b/src/dirstress.c
> > index f8f73553a1bc..33a166c51819 100644
> > --- a/src/dirstress.c
> > +++ b/src/dirstress.c
> > @@ -203,8 +203,10 @@ dirstress(
> >          if (verbose) fprintf(stderr,"** [%d] chdir ..\n", pid);
> >  	error = chdir("..");
> >  	if (error) {
> > -		/* If this is multithreaded, then expecting a ENOENT here is fine */
> > -		if (nprocs_per_dir > 1 && errno == ENOENT) {
> > +		/* If this is multithreaded, then expecting a ENOENT here is fine,
> > +		 * and ESTALE is normal in the NFS case. */
> > +		if (nprocs_per_dir > 1 &&
> > +				(errno == ENOENT || errno = ESTALE)) {
>                                                          ^^^ this should be ==
> >  			return 0;
> >  		}
> >  
> > @@ -224,8 +226,10 @@ dirstress(
> >          if (verbose) fprintf(stderr,"** [%d] chdir ..\n", pid);
> >  	error = chdir("..");
> >  	if (error) {
> > -		/* If this is multithreaded, then expecting a ENOENT here is fine */
> > -		if (nprocs_per_dir > 1 && errno == ENOENT) {
> > +		/* If this is multithreaded, then expecting a ENOENT here is fine,
> > +		 * and ESTALE is normal in the NFS case. */
> > +		if (nprocs_per_dir > 1 &&
> > +				(errno == ENOENT || errno = ESTALE)) {
>                                                          ^^^ same here
> 
> I can fix them at commit time, no resend is needed.

Oh, good grief.  Thanks for catching that!

I can confirm that my problem's still fixed with the corrected patch.

--b.

> 
> Thanks,
> Eryu
> 
> >  			return 0;
> >  		}
> >  
> > -- 
> > 2.9.3
> > 
> > --
> > To unsubscribe from this list: send the line "unsubscribe fstests" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html

      reply	other threads:[~2016-11-29 14:35 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-23 22:20 [PATCH xfstests] dirstress: Allow ESTALE as well as ENOENT J. Bruce Fields
2016-11-23 23:19 ` Andreas Dilger
2016-11-25  3:47   ` J. Bruce Fields
2016-11-25 11:35     ` Eryu Guan
2016-11-26  1:39       ` [PATCH 1/2] Document fstests mailing list J. Bruce Fields
2016-11-26  1:39         ` [PATCH 2/2] dirstress: Allow ESTALE as well as ENOENT J. Bruce Fields
2016-11-29  6:43           ` Eryu Guan
2016-11-29 14:34             ` J. Bruce Fields [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=20161129143451.GA6504@fieldses.org \
    --to=bfields@fieldses.org \
    --cc=adilger@dilger.ca \
    --cc=eguan@redhat.com \
    --cc=fstests@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-nfs@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).