Linux NFS development
 help / color / mirror / Atom feed
From: "J. Bruce Fields" <bfields@fieldses.org>
To: Christoph Hellwig <hch@lst.de>
Cc: Jeff Layton <jlayton@poochiereds.net>,
	Kinglong Mee <kinglongmee@gmail.com>,
	linux-nfs@vger.kernel.org
Subject: Re: [PATCH RFC] nfsd: serialize layout stateid morphing operations
Date: Thu, 3 Dec 2015 17:08:50 -0500	[thread overview]
Message-ID: <20151203220850.GC19518@fieldses.org> (raw)
In-Reply-To: <20151202072504.GA15839@lst.de>

On Wed, Dec 02, 2015 at 08:25:04AM +0100, Christoph Hellwig wrote:
> On Tue, Dec 01, 2015 at 05:48:00PM -0500, Jeff Layton wrote:
> > > But for non-forgetful clients I wonder if returning 0 should be
> > > interpreted the same as NFS4ERR_DELAY?  Note that we still need to
> > > time out the client if it doesn't respond in time, so NFS4ERR_DELAY
> > > seems better than 0, but the standard doesn't really talk about
> > > return values other than NFS4ERR_NOMATCHING_LAYOUT.
> > 
> > My interpretation is somewhat different. To me, this is how we'd
> > interpret the response from the client (pseudocode):
> > 
> > NFS_OK:
> > 	/* Message received. I'll start returning these layouts soon. */
> > NFS4ERR_DELAY:
> > 	/* I'm too resource constrained to even process this simple
> >            request right now. Please ask me again in a bit. */
> > NFS4ERR_NOMATCHING_LAYOUT:
> > 	/* Huh? What layout? */
> > 
> > ...IMO, the spec is pretty clear that a successful response from the
> > client just means that it got the message that it should start
> > returning layouts. If it happens to return anything before the cb
> > response, then that's just luck/coincidence. The server shouldn't count
> > on that.
> 
> Ok, so for 0 we should re check if the layouts are still outstanding
> before sending the next recall.  But given that we have no client
> returning that or test cases I'd be tempted to treat OK like DELAY
> for now - if the client is properly implemented it will eventually
> return NFS4ERR_NOMATCHING_LAYOUT.  We can add a big comment on why
> we're doing that so that it's obvious.

OK, so if I understand right, the current code is letting the rpc state
machine drive the whole thing, and your proposal is that the rpc task
lasts until the client either responds NFS4ERR_NOMATCHING_LAYOUT or we
just run out of time.  (NOMATCHING_LAYOUT being the one response that
isn't either "try again" or "OK I'll get to it soon").

I understand why that would work, and that handling anything other than
the NOMATCHING_LAYOUT case is a lower priority for now, but this
approach worries me.

Is there a reason we can't do as in the delegation case, and track the
revocation timeout separately from the callback rpc?

--b.

  reply	other threads:[~2015-12-03 22:08 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-17 11:58 [PATCH RFC] nfsd: serialize layout stateid morphing operations Jeff Layton
2015-10-11 13:15 ` Christoph Hellwig
2015-10-11 20:51   ` Jeff Layton
2015-10-23 19:35     ` J. Bruce Fields
2015-11-29  4:07 ` Kinglong Mee
2015-11-29 13:46   ` Jeff Layton
2015-11-30  2:57     ` Kinglong Mee
2015-11-30 21:34       ` J. Bruce Fields
2015-12-01  0:33         ` Jeff Layton
2015-12-01  0:55           ` Trond Myklebust
2015-12-01 11:56           ` Christoph Hellwig
2015-12-01 22:48             ` Jeff Layton
2015-12-02  7:25               ` Christoph Hellwig
2015-12-03 22:08                 ` J. Bruce Fields [this message]
2015-12-04  8:38                   ` Christoph Hellwig
2015-12-04 20:51                     ` Jeff Layton
2015-12-05 12:02                       ` Christoph Hellwig
2015-12-05 12:24                         ` Jeff Layton
2015-12-06 13:09                           ` Jeff Layton
2015-12-07 13:09                             ` Christoph Hellwig
2015-12-07 13:28                               ` Jeff Layton
2015-12-07 14:17                                 ` Christoph Hellwig
2015-12-07 16:12                                   ` Jeff Layton
2015-12-07 16:43                                     ` J. Bruce Fields
2015-12-16 16:55                             ` J. Bruce Fields
2015-12-07 13:07                           ` Christoph Hellwig

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=20151203220850.GC19518@fieldses.org \
    --to=bfields@fieldses.org \
    --cc=hch@lst.de \
    --cc=jlayton@poochiereds.net \
    --cc=kinglongmee@gmail.com \
    --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