linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Trond Myklebust <trondmy@hammerspace.com>
To: "bfields@fieldses.org" <bfields@fieldses.org>
Cc: "linux-nfs@vger.kernel.org" <linux-nfs@vger.kernel.org>,
	"bfields@redhat.com" <bfields@redhat.com>,
	"chuck.lever@oracle.com" <chuck.lever@oracle.com>
Subject: Re: [PATCH 2/2] nfsd: Record NFSv4 pre/post-op attributes as non-atomic
Date: Tue, 1 Dec 2020 20:59:00 +0000	[thread overview]
Message-ID: <34503d767cffb6b8ffc94dc80ae7632d38a7d68f.camel@hammerspace.com> (raw)
In-Reply-To: <20201201205359.GC21355@fieldses.org>

On Tue, 2020-12-01 at 15:53 -0500, bfields@fieldses.org wrote:
> On Tue, Dec 01, 2020 at 08:27:38PM +0000, Trond Myklebust wrote:
> > As far as I can tell, there is no need for it at all, since both
> > the
> > NFSv3 and NFSv4 client can supply atomic struct change_info4 in the
> > cases where it is relevant (those cases being recording the changes
> > to
> > the parent directory/ies when doing CREATE, OPEN(O_CREAT), LINK,
> > REMOVE
> > and RENAME).
> 
> I was wondering about that.  We'd need some additional interface to
> allow nfs to supply that stuff to nfsd, right?

The only problem is the pre-op attributes, since those are supplied by
the server but never recorded anywhere. Otherwise, all you really need
is to hold the inode lock on the directory to prevent the client from
making updates after the operation is done.

-- 
Trond Myklebust
Linux NFS client maintainer, Hammerspace
trond.myklebust@hammerspace.com



  reply	other threads:[~2020-12-01 20:59 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-01  4:14 [PATCH 1/2] nfsd: Avoid /* Fallthrough */ trondmy
2020-12-01  4:14 ` [PATCH 2/2] nfsd: Record NFSv4 pre/post-op attributes as non-atomic trondmy
2020-12-01 16:10   ` Chuck Lever
2020-12-01 19:35   ` J. Bruce Fields
2020-12-01 20:18     ` Trond Myklebust
2020-12-01 20:27       ` Trond Myklebust
2020-12-01 20:53         ` bfields
2020-12-01 20:59           ` Trond Myklebust [this message]
2020-12-01 21:14             ` bfields
2020-12-01 15:24 ` [PATCH 1/2] nfsd: Avoid /* Fallthrough */ Chuck Lever

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=34503d767cffb6b8ffc94dc80ae7632d38a7d68f.camel@hammerspace.com \
    --to=trondmy@hammerspace.com \
    --cc=bfields@fieldses.org \
    --cc=bfields@redhat.com \
    --cc=chuck.lever@oracle.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;
as well as URLs for NNTP newsgroup(s).