From: Jeff Layton <jlayton@redhat.com>
To: "J. Bruce Fields" <bfields@fieldses.org>
Cc: linux-nfs@vger.kernel.org
Subject: Re: [PATCH 1/3] nfsd: don't try to shut down nfs4 state handling unless it's up
Date: Tue, 15 Jun 2010 13:36:22 -0400 [thread overview]
Message-ID: <20100615133622.10dad9f2@corrin.poochiereds.net> (raw)
In-Reply-To: <20100613202842.GA14132@fieldses.org>
On Sun, 13 Jun 2010 16:28:42 -0400
"J. Bruce Fields" <bfields@fieldses.org> wrote:
> On Wed, Jun 09, 2010 at 02:29:43PM -0400, Jeff Layton wrote:
> > Ahh ok, I see what you're talking about now. Yeah, that should probably
> > also be fixed. I think we just need to ensure to shut down the state in
> > an error condition. Something like this compile-tested only patch?
> >
> > From 19bd25ea9a76ea184e4c30831765e812ce19b0a5 Mon Sep 17 00:00:00 2001
> > From: Jeff Layton <jlayton@redhat.com>
> > Date: Wed, 9 Jun 2010 14:21:51 -0400
> > Subject: [PATCH] nfsd: shut down NFSv4 state when nfsd_svc encounters an error
> >
> > Currently, it's left up in some situations. That could cause the grace
> > period to be shorter than it should be (along with other problems).
>
> The patch looks right to me, thanks.
>
> --b.
>
FWIW, I've done a bit of testing with this patch on top of the other
set and it seems to be ok. That said, I don't have a reliable test that
makes the state setup "leak" like this, so I can't really say much
other than that it seems to be ok.
> >
> > Signed-off-by: Jeff Layton <jlayton@redhat.com>
> > ---
> > fs/nfsd/nfssvc.c | 11 +++++++----
> > 1 files changed, 7 insertions(+), 4 deletions(-)
> >
> > diff --git a/fs/nfsd/nfssvc.c b/fs/nfsd/nfssvc.c
> > index 06b2a26..a06ea99 100644
> > --- a/fs/nfsd/nfssvc.c
> > +++ b/fs/nfsd/nfssvc.c
> > @@ -402,9 +402,9 @@ nfsd_svc(unsigned short port, int nrservs)
> > nfsd_reset_versions();
> >
> > error = nfsd_create_serv();
> > -
> > if (error)
> > - goto out;
> > + goto shutdown_state;
> > +
> > error = nfsd_init_socks(port);
> > if (error)
> > goto failure;
> > @@ -416,9 +416,12 @@ nfsd_svc(unsigned short port, int nrservs)
> > * so subtract 1
> > */
> > error = nfsd_serv->sv_nrthreads - 1;
> > - failure:
> > +failure:
> > svc_destroy(nfsd_serv); /* Release server */
> > - out:
> > +shutdown_state:
> > + if (error < 0)
> > + nfs4_state_shutdown();
> > +out:
> > mutex_unlock(&nfsd_mutex);
> > return error;
> > }
> > --
> > 1.5.5.6
> >
--
Jeff Layton <jlayton@redhat.com>
next prev parent reply other threads:[~2010-06-15 17:34 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-07 15:33 [PATCH 0/3] nfsd: fix error handling in write_ports interfaces Jeff Layton
2010-06-07 15:33 ` [PATCH 1/3] nfsd: don't try to shut down nfs4 state handling unless it's up Jeff Layton
2010-06-08 23:58 ` J. Bruce Fields
2010-06-09 10:29 ` Jeff Layton
[not found] ` <20100609062922.4bae21ac-4QP7MXygkU+dMjc06nkz3ljfA9RmPOcC@public.gmane.org>
2010-06-09 18:09 ` J. Bruce Fields
2010-06-09 18:29 ` Jeff Layton
[not found] ` <20100609142943.60d31a11-9yPaYZwiELC+kQycOl6kW4xkIHaj4LzF@public.gmane.org>
2010-06-13 20:28 ` J. Bruce Fields
2010-06-15 17:36 ` Jeff Layton [this message]
[not found] ` <20100615133622.10dad9f2-4QP7MXygkU+dMjc06nkz3ljfA9RmPOcC@public.gmane.org>
2010-06-15 17:36 ` J. Bruce Fields
2010-06-26 15:53 ` J. Bruce Fields
[not found] ` <20100626155351.GA16951-+qGSg9AQ1cLTsXDwO4sDpg@public.gmane.org>
2010-06-27 1:08 ` Jeff Layton
2010-06-07 15:33 ` [PATCH 2/3] nfsd: fix error handling when starting nfsd with rpcbind down Jeff Layton
2010-06-07 15:33 ` [PATCH 3/3] nfsd: fix error handling in __write_ports_addxprt Jeff Layton
2010-06-09 0:00 ` [PATCH 0/3] nfsd: fix error handling in write_ports interfaces J. Bruce Fields
2010-06-09 10:43 ` Jeff Layton
2010-06-09 0:49 ` J. Bruce Fields
2010-06-09 10:55 ` Jeff Layton
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=20100615133622.10dad9f2@corrin.poochiereds.net \
--to=jlayton@redhat.com \
--cc=bfields@fieldses.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