All of lore.kernel.org
 help / color / mirror / Atom feed
From: "J. Bruce Fields" <bfields@fieldses.org>
To: "Myklebust, Trond" <Trond.Myklebust@netapp.com>
Cc: "linux-nfs@vger.kernel.org" <linux-nfs@vger.kernel.org>
Subject: Re: [PATCH 1/2] NFSv4: Servers should only check SETATTR stateid open mode on size change
Date: Mon, 29 Apr 2013 14:41:04 -0400	[thread overview]
Message-ID: <20130429184103.GO17268@fieldses.org> (raw)
In-Reply-To: <1367260382.19515.29.camel@leira.trondhjem.org>

On Mon, Apr 29, 2013 at 06:33:02PM +0000, Myklebust, Trond wrote:
> On Mon, 2013-04-29 at 14:29 -0400, J. Bruce Fields wrote:
> > On Mon, Apr 29, 2013 at 06:27:07PM +0000, Myklebust, Trond wrote:
> > > On Mon, 2013-04-29 at 14:21 -0400, J. Bruce Fields wrote:
> > > > On Mon, Apr 29, 2013 at 06:15:52PM +0000, Myklebust, Trond wrote:
> > > > > On Mon, 2013-04-29 at 11:15 -0400, Trond Myklebust wrote:
> > > > > > The NFSv4 and NFSv4.1 specs are both clear that the server should only check
> > > > > > stateid open mode if a SETATTR specifies the size attribute. If the
> > > > > > open mode is not one that allows writing, then it returns NFS4ERR_OPENMODE.
> > > > > > 
> > > > > > In the case where the SETATTR is not changing the size, the client will
> > > > > > still pass it the delegation stateid to ensure that the server does not
> > > > > > recall that delegation. In that case, the server should _ignore_ the
> > > > > > delegation open mode, and simply apply standard permission checks.
> > > > > 
> > > > > Bruce, what does the Linux server do when we send it a delegation
> > > > > stateid as part of a SETATTR that just changes the mode or acl (no size
> > > > > change)? Will it recall the delegation? How about the delegations held
> > > > > by other clients?
> > > > 
> > > > Yes, it breaks all delegations on any setattr.
> > > 
> > > Do you plan to change that?
> > 
> > I'd take patches.
> 
> Have the NFSv4 delegation patches been merged yet, and do they hand out
> delegations on file creation?

The vfs support patches haven't been merged, but nfsd still continues to
give out read delegations on any confirmed read-open of a file that
hasn't had a recent delegation conflict.  (They're just not consistent
w.r.t local metadata operations....)

--b.

  reply	other threads:[~2013-04-29 18:41 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-29 15:15 [PATCH 1/2] NFSv4: Servers should only check SETATTR stateid open mode on size change Trond Myklebust
2013-04-29 15:15 ` [PATCH 2/2] NFSv4: Warn once about servers that incorrectly apply open mode to setattr Trond Myklebust
2013-04-29 18:15 ` [PATCH 1/2] NFSv4: Servers should only check SETATTR stateid open mode on size change Myklebust, Trond
2013-04-29 18:21   ` J. Bruce Fields
2013-04-29 18:27     ` Myklebust, Trond
2013-04-29 18:29       ` J. Bruce Fields
2013-04-29 18:33         ` Myklebust, Trond
2013-04-29 18:41           ` J. Bruce Fields [this message]
2013-04-29 19:09             ` Myklebust, Trond
2013-04-29 19:16               ` J. Bruce Fields
2013-04-29 18:28     ` 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=20130429184103.GO17268@fieldses.org \
    --to=bfields@fieldses.org \
    --cc=Trond.Myklebust@netapp.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.