linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Layton <jlayton@kernel.org>
To: Chuck Lever <chuck.lever@oracle.com>, Neil Brown <neilb@suse.de>,
	 Olga Kornievskaia <okorniev@redhat.com>,
	Dai Ngo <Dai.Ngo@oracle.com>,  Tom Talpey <tom@talpey.com>,
	Trond Myklebust <trondmy@kernel.org>,
	 Anna Schumaker <anna@kernel.org>,
	Alexander Viro <viro@zeniv.linux.org.uk>,
	 Christian Brauner <brauner@kernel.org>, Jan Kara <jack@suse.cz>
Cc: Tom Haynes <loghyr@gmail.com>,
	linux-nfs@vger.kernel.org,  linux-kernel@vger.kernel.org,
	linux-fsdevel@vger.kernel.org,  Jeff Layton <jlayton@kernel.org>
Subject: [PATCH v4 00/11] nfsd: implement the "delstid" draft
Date: Thu, 05 Sep 2024 08:41:44 -0400	[thread overview]
Message-ID: <20240905-delstid-v4-0-d3e5fd34d107@kernel.org> (raw)

Sorry this has taken me a bit to re-post. I've been working on some
pynfs testcases for CB_GETATTR, and have found more bugs in our
implementation.

This repost is based on top of Chuck's nfsd-next branch. The first two
patches fix a couple of different bugs in how we handle the change attr.

I also dropped one of the patches from the last series that tried to
correct how we were handling the change attr.  After going over RFC8881
section 10.4.3 a few times, I think the existing code in this respect is
actually correct. We advance the change attr in the inode on every
CB_GETATTR, which follows the guidance in the spec.

The rest of the series is more or less the same as the last one.

Signed-off-by: Jeff Layton <jlayton@kernel.org>
---
Changes in v4:
- get attrs from correct inode when issuing write deleg
- dropped some change attr handling patches that were incorrect
- only request FATTR4_CHANGE in CB_GETATTR if the file isn't modified
- Link to v3: https://lore.kernel.org/r/20240829-delstid-v3-0-271c60806c5d@kernel.org

Changes in v3:
- fix includes in nfs4xdr_gen.c
- drop ATTR_CTIME_DLG flag (just use ATTR_DELEG instead)
- proper handling for SETATTR (maybe? Outstanding q about stateid here)
- incorporate Neil's patches for handling non-delegation leases
- always return times from CB_GETATTR instead of from local vfs_getattr
- fix potential races vs. mgtimes by moving ctime handling into VFS layer
- Link to v2: https://lore.kernel.org/r/20240826-delstid-v2-0-e8ab5c0e39cc@kernel.org

Changes in v2:
- rebase onto Chuck's lkxdrgen branch, and reworked how autogenerated
  code is included
- declare nfsd_open_arguments as a global, so it doesn't have to be
  set up on the stack each time
- delegated timestamp support has been added
- Link to v1: https://lore.kernel.org/r/20240816-delstid-v1-0-c221c3dc14cd@kernel.org

---
Jeff Layton (11):
      nfsd: fix initial getattr on write delegation
      nfsd: drop the ncf_cb_bmap field
      nfsd: don't request change attr in CB_GETATTR once file is modified
      nfsd: drop the nfsd4_fattr_args "size" field
      nfsd: have nfsd4_deleg_getattr_conflict pass back write deleg pointer
      nfs_common: make include/linux/nfs4.h include generated nfs4.h
      nfsd: add support for FATTR4_OPEN_ARGUMENTS
      nfsd: implement OPEN_ARGS_SHARE_ACCESS_WANT_OPEN_XOR_DELEGATION
      fs: handle delegated timestamps in setattr_copy_mgtime
      nfsd: add support for delegated timestamps
      nfsd: handle delegated timestamps in SETATTR

 fs/attr.c                 |  28 +++++---
 fs/inode.c                |  74 ++++++++++++++++++++++
 fs/nfsd/Makefile          |   2 +-
 fs/nfsd/nfs4callback.c    |  50 +++++++++++++--
 fs/nfsd/nfs4proc.c        |  29 ++++++++-
 fs/nfsd/nfs4state.c       | 158 ++++++++++++++++++++++++++++++++++++++--------
 fs/nfsd/nfs4xdr.c         | 108 +++++++++++++++++++++++++++----
 fs/nfsd/nfsd.h            |   5 +-
 fs/nfsd/state.h           |   6 +-
 fs/nfsd/xdr4cb.h          |  10 ++-
 include/linux/fs.h        |   2 +
 include/linux/nfs4.h      |   7 +-
 include/linux/nfs_xdr.h   |   5 --
 include/linux/time64.h    |   5 ++
 include/uapi/linux/nfs4.h |   7 +-
 15 files changed, 416 insertions(+), 80 deletions(-)
---
base-commit: 5cd183a621de1d76daeb58379d7a2c2f8dc1143f
change-id: 20240815-delstid-93290691ad11

Best regards,
-- 
Jeff Layton <jlayton@kernel.org>


             reply	other threads:[~2024-09-05 12:41 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-05 12:41 Jeff Layton [this message]
2024-09-05 12:41 ` [PATCH v4 01/11] nfsd: fix initial getattr on write delegation Jeff Layton
2024-09-05 15:46   ` Chuck Lever
2024-09-05 17:37     ` Jeff Layton
2024-09-06 14:08   ` Jeff Layton
2024-09-06 14:36     ` Chuck Lever
2024-09-08 18:00   ` Chuck Lever
2024-09-08 20:40     ` Jeff Layton
2024-12-27  6:42       ` Cedric Blancher
2024-12-27  7:53   ` Cedric Blancher
2024-12-27 17:59     ` Chuck Lever
2024-09-05 12:41 ` [PATCH v4 02/11] nfsd: drop the ncf_cb_bmap field Jeff Layton
2024-09-05 12:41 ` [PATCH v4 03/11] nfsd: don't request change attr in CB_GETATTR once file is modified Jeff Layton
2024-09-05 12:41 ` [PATCH v4 04/11] nfsd: drop the nfsd4_fattr_args "size" field Jeff Layton
2024-09-05 12:41 ` [PATCH v4 05/11] nfsd: have nfsd4_deleg_getattr_conflict pass back write deleg pointer Jeff Layton
2024-09-05 12:41 ` [PATCH v4 06/11] nfs_common: make include/linux/nfs4.h include generated nfs4.h Jeff Layton
2024-09-05 12:41 ` [PATCH v4 07/11] nfsd: add support for FATTR4_OPEN_ARGUMENTS Jeff Layton
2024-09-05 12:41 ` [PATCH v4 08/11] nfsd: implement OPEN_ARGS_SHARE_ACCESS_WANT_OPEN_XOR_DELEGATION Jeff Layton
2024-09-05 12:41 ` [PATCH v4 09/11] fs: handle delegated timestamps in setattr_copy_mgtime Jeff Layton
2024-09-05 15:44   ` Chuck Lever
2024-09-05 17:46     ` Jeff Layton
2024-09-07 10:21       ` Christian Brauner
2024-09-07 10:22   ` (subset) " Christian Brauner
2024-09-05 12:41 ` [PATCH v4 10/11] nfsd: add support for delegated timestamps Jeff Layton
2024-09-05 12:41 ` [PATCH v4 11/11] nfsd: handle delegated timestamps in SETATTR Jeff Layton
2024-09-05 18:09 ` [PATCH v4 00/11] nfsd: implement the "delstid" draft cel

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=20240905-delstid-v4-0-d3e5fd34d107@kernel.org \
    --to=jlayton@kernel.org \
    --cc=Dai.Ngo@oracle.com \
    --cc=anna@kernel.org \
    --cc=brauner@kernel.org \
    --cc=chuck.lever@oracle.com \
    --cc=jack@suse.cz \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=loghyr@gmail.com \
    --cc=neilb@suse.de \
    --cc=okorniev@redhat.com \
    --cc=tom@talpey.com \
    --cc=trondmy@kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /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).