From: "J. Bruce Fields" <bfields@fieldses.org>
To: Neil Brown <neilb@suse.de>
Cc: linux-nfs@vger.kernel.org
Subject: Re: [PATCH 3/6] sunrpc: close connection when a request is irretrievably lost.
Date: Tue, 21 Sep 2010 22:13:10 -0400 [thread overview]
Message-ID: <20100922021309.GA22021@fieldses.org> (raw)
In-Reply-To: <20100922093725.48a1a5fe@notabene>
On Wed, Sep 22, 2010 at 09:37:25AM +1000, Neil Brown wrote:
> On Tue, 21 Sep 2010 16:53:43 -0400
> "J. Bruce Fields" <bfields@fieldses.org> wrote:
>
> > Apologies for the delay getting to the rest of these.
> >
> > On Thu, Aug 12, 2010 at 05:04:07PM +1000, NeilBrown wrote:
> > > If we drop a request in the sunrpc layer, either due kmalloc failure,
> > > or due to a cache miss when we could not queue the request for later
> > > replay, then close the connection to encourage the client to retry sooner.
> > >
> > > Note that if the drop happens in the NFS layer, NFSERR_JUKEBOX
> > > (aka NFS4ERR_DELAY) is returned to guide the client concerning
> > > replay.
> >
> > Looks fine, but:
> >
> > > diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c
> > > index d9017d6..6359c42 100644
> > > --- a/net/sunrpc/svc.c
> > > +++ b/net/sunrpc/svc.c
> > > @@ -1055,6 +1055,9 @@ svc_process_common(struct svc_rqst *rqstp, struct kvec *argv, struct kvec *resv)
> > > goto err_bad;
> > > case SVC_DENIED:
> > > goto err_bad_auth;
> > > + case SVC_CLOSE:
> > > + if (test_bit(XPT_TEMP, &rqstp->rq_xprt->xpt_flags))
> > > + svc_close_xprt(rqstp->rq_xprt);
> >
> > There are also dropit's later in svc_process_common when xdr encoding
> > fails. I wonder if we should close there?
> >
> > Well, it's an odd case. Seems like it should almost be declared a
> > programming error and made a WARN().
> >
> > Applying as is.--b.
>
> Thanks, I was wondering what had happened to these...
>
> I cannot find them in your git though - not pushed yet, or am I looking in
> the wrong branch (for-2.6.37 and nfsd-next seem the obvious choices).
Yeah, that's the right place, apologies, I just tend to say "applied"
when I add them to my local tree, but then I wait till some tests have
run at least before actually pushing them out.
> For the other 'dropit' cases I think the svc_authorise failure is most likely
> to be interesting. That can only fail if svcauth_gss_wrap_resp_* fails. I
> don't really know what that means that ... maybe we should close the
> connection in that case.
If dropping the connection is our way of communicating "I've lost one of
your requests, you're never going to see the reply until you retry",
then perhaps the only time we should drop is when we've deferred.
(In which case, maybe s/SVC_DROP/SVC_DEFERRED/.)
Anyway, they're all pushed out now. The last one required more fixing
up (thanks to my gratuitous cleanup patch), but I think it's right....
--b.
next prev parent reply other threads:[~2010-09-22 2:14 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-12 7:04 [PATCH 0/6] Cache deferral improvements - try N+2 NeilBrown
2010-08-12 7:04 ` [PATCH 1/6] sunrpc/cache: allow threads to block while waiting for cache update NeilBrown
2010-08-12 7:04 ` [PATCH 2/6] nfsd/idmap: drop special request deferal in favour of improved default NeilBrown
[not found] ` <20100812070406.11459.89468.stgit-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2010-09-21 21:08 ` J. Bruce Fields
2010-08-12 7:04 ` [PATCH 4/6] nfsd: disable deferral for NFSv4 NeilBrown
[not found] ` <20100812070407.11459.2929.stgit-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2010-09-21 21:01 ` J. Bruce Fields
2010-08-12 7:04 ` [PATCH 5/6] svcauth_gss: replace a trivial 'switch' with an 'if' NeilBrown
2010-08-12 7:04 ` [PATCH 3/6] sunrpc: close connection when a request is irretrievably lost NeilBrown
2010-09-21 20:53 ` J. Bruce Fields
2010-09-21 23:37 ` Neil Brown
2010-09-22 2:13 ` J. Bruce Fields [this message]
2010-08-12 7:04 ` [PATCH 6/6] sunrpc/cache: change deferred-request hash table to use hlist NeilBrown
[not found] ` <20100812065722.11459.18978.stgit-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2010-08-12 12:03 ` [PATCH 0/6] Cache deferral improvements - try N+2 J. Bruce Fields
2010-08-17 5:15 ` [PATCH 1.5/6] Fix race in new request delay code NeilBrown
2010-08-26 21:08 ` J. Bruce Fields
2010-08-29 23:36 ` Neil Brown
2010-09-01 11:31 ` J. Bruce Fields
2010-09-21 8:35 ` Neil Brown
2010-09-22 2:15 ` J. Bruce Fields
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=20100922021309.GA22021@fieldses.org \
--to=bfields@fieldses.org \
--cc=linux-nfs@vger.kernel.org \
--cc=neilb@suse.de \
/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).