linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: NeilBrown <neilb@suse.com>
To: Trond Myklebust <trondmy@primarydata.com>
Cc: List Linux NFS Mailing <linux-nfs@vger.kernel.org>
Subject: Re: Incorrect(?) use of open_state->stateid in pnfs
Date: Fri, 14 Oct 2016 08:55:17 +1100	[thread overview]
Message-ID: <87vawvzzga.fsf@notabene.neil.brown.name> (raw)
In-Reply-To: <48DEE414-C703-498E-9FAB-0C96C38F58D2@primarydata.com>

[-- Attachment #1: Type: text/plain, Size: 1112 bytes --]

On Fri, Oct 14 2016, Trond Myklebust wrote:

>> On Oct 13, 2016, at 03:18, NeilBrown <neilb@suse.com> wrote:
>> 
>> 
>> Suppose I open/create a file over pNFS and am given a WRITE delegation.
>> I then chmod the file (as rsync is wont to do) so the delegation is
>> immediately returned.
>> I then proceed to write, which triggers a LAYOUT_GET request.  The
>> stateid for that request it taken from state->stateid, which is still
>> the delegation stateid.  Naturally it gets NFS4ERR_BAD_STATEID.
>
> Umm… Why isn’t the client recovering open stateids as part of the delegation return? That would appear to be the root cause problem here.

Ahh.. that's where it happens.  Of course.  Thanks.
I was thinking that where would be no opens to recover because the
delegation wasn't used to complete any other opens.  But there is more
to the recovery than that.

>
> Is this the latest upstream kernel?

No, it is 3.12 based.  I now see that I am just missing

Commit: 5e99b532bb95 ("nfs4: reset states to use open_stateid when returning delegation voluntarily")

Thanks!

NeilBrown

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 800 bytes --]

      reply	other threads:[~2016-10-13 22:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-13  7:18 Incorrect(?) use of open_state->stateid in pnfs NeilBrown
2016-10-13 13:08 ` Trond Myklebust
2016-10-13 21:55   ` NeilBrown [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=87vawvzzga.fsf@notabene.neil.brown.name \
    --to=neilb@suse.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=trondmy@primarydata.com \
    /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).