From: NeilBrown <neilb@suse.com>
To: Jeff Layton <jlayton@poochiereds.net>, linux-nfs@vger.kernel.org
Cc: Christoph Hellwig <hch@infradead.org>
Subject: Re: Confused by pnfs LAYOUTRETURN - seeking clarity.
Date: Mon, 06 Mar 2017 14:54:49 +1100 [thread overview]
Message-ID: <87r32bjbzq.fsf@notabene.neil.brown.name> (raw)
In-Reply-To: <1488569105.2997.1.camel@poochiereds.net>
[-- Attachment #1: Type: text/plain, Size: 1995 bytes --]
On Fri, Mar 03 2017, Jeff Layton wrote:
>
> There is one special case...
>
> When the server does a CB_LAYOUTRECALL, the client can reply with
> NFS4ERR_NOMATCHING_LAYOUT if it's not actively using the layout at the
> time. With that, the client isn't expected to do a LAYOUTRETURN.
>
> Any other status on the CB_LAYOUTRECALL however does require a
> LAYOUTRETURN.
Thanks, both to you and Christoph, for this pointer.
Things are starting to make sense.
However RFC5661 says under
Operation 5: CB_LAYOUTRECALL - Recall Layout from Client
While the client responds to the CB_LAYOUTRECALL immediately, the
operation is not considered complete (i.e., considered pending) until
all affected layouts are returned to the server via the LAYOUTRETURN
operation.
which seems to strongly imply that a LAYOUTRETURN is expected. No
alternative is listed.
Further:
The NFS4ERR_NOMATCHING_LAYOUT error is only returned when the client
does not hold layouts for the file or if the client does not have
any overlapping layouts for the specification in the layout recall.
This is an *error* condition. The client really does still hold
the layouts if it hasn't sent "LAYOUTRETURN". The fact that the linux
client chooses to forget them and won't ever use them again isn't really
the same thing as "not hold[ing] layouts".
If I were a server author and I got NFS4ERR_NOMATCHING_LAYOUT for a
CB_LAYOUTRECALL where a I knew for certain that the client really did
have the layout, then I would probably feel justified in discarding all
state held by that confused client, and requiring to re-establish
everything (because I cannot trust anything any more).
So the Netapp filer is clearly doing the wrong thing, as we doesn't send
CB_LAYOUTRECALL. But I'm far from convinced that Linux is doing the
right thing by replying NFS4ERR_NOMATCHING_LAYOUT.
However, I'm not going to try to "fix" anything here. Hopefully we can
manage to stumble forward.
Thanks again,
NeilBrown
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
next prev parent reply other threads:[~2017-03-06 3:54 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-02 21:24 Confused by pnfs LAYOUTRETURN - seeking clarity NeilBrown
2017-03-03 15:16 ` Christoph Hellwig
2017-03-03 19:25 ` Jeff Layton
2017-03-06 3:54 ` NeilBrown [this message]
2017-03-07 0:48 ` Trond Myklebust
2017-03-07 20:09 ` NeilBrown
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=87r32bjbzq.fsf@notabene.neil.brown.name \
--to=neilb@suse.com \
--cc=hch@infradead.org \
--cc=jlayton@poochiereds.net \
--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).