[PATCH v2 0/7] nfsd: implement the "delstid" draft

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This adds support for most of the "delstid" draft:

    https://datatracker.ietf.org/doc/draft-ietf-nfsv4-delstid/06/

This includes a number of new features around the OPEN call:

- support for FATTR4_OPEN_ARGUMENTS: A new way for clients to discover
  what OPEN features the server supports at mount time.

- support for OPEN_XOR_DELEGATION: The server can send only a delegation
  stateid in response to an OPEN (avoiding the useless open stateid in
  that case).

- support for delegated timestamps: when the client holds a write
  delegation, it can send an updated atime and mtime in the CB_GETATTR
  response

FATTR4_OFFLINE is not implemented, since we don't have a way to
designate that under Linux. [1]

This patchset depends on a number of patchsets still in flight:
- the multigrain timestamp series [2] (in Christian's vfs.mgtime branch)
- the nfsd CB_GETATTR fixes [3][4] (in Chuck's nfsd-fixes branch)
- Chuck's xdrgen patches [5] (in Chuck's lkxdrgen branch)

If you want to test this functionality, you'll also need client-side
patches that went into v6.11-rc5 [6][7].

I should make special mention of patch #2, which starts integrating the
xdrgenerated header. That will affect both the client and server, so I
want to make sure everyone (Trond and Anna, in particular) is on board
with this scheme before we merge it.

For now, that patch just moves the header from where it was in Chuck's
tree, but it'd probably be better to add a new "make xdrgen" target for
that, long term.

[1]: We could add a STATX_ATTR_OFFLINE flag for this, but the userland
     use-cases are not 100% clear to me.
[2]: https://lore.kernel.org/linux-fsdevel/20240715-mgtime-v6-0-48e5d34bd2ba@xxxxxxxxxx/
[3]: https://lore.kernel.org/linux-nfs/Zsoe%2FD24xvLfKClT@xxxxxxxxxxxxxxxxxxxxxx/T/#t
[4]: https://lore.kernel.org/linux-nfs/ZsofUUJeB1wbONyi@xxxxxxxxxxxxxxxxxxxxxx/T/#t
[5]: https://lore.kernel.org/linux-nfs/20240820144600.189744-1-cel@xxxxxxxxxx/T/#me0207d0b18c19ddbf1cf698acff7e591bb4b100c
[6]: https://lore.kernel.org/linux-nfs/20240815141841.29620-1-jlayton@xxxxxxxxxx/
[7]: https://lore.kernel.org/linux-nfs/20240821-nfs-6-11-v2-1-44478efe1650@xxxxxxxxxx/

Signed-off-by: Jeff Layton <jlayton@xxxxxxxxxx>
---
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@xxxxxxxxxx

---
Jeff Layton (7):
      nfsd: add pragma public to delegated timestamp types
      nfs_common: make nfs4.h include generated nfs4_1.h
      nfsd: add support for FATTR4_OPEN_ARGUMENTS
      nfsd: implement OPEN_ARGS_SHARE_ACCESS_WANT_OPEN_XOR_DELEGATION
      fs: add an ATTR_CTIME_DLG flag
      nfsd: drop the ncf_cb_bmap field
      nfsd: add support for delegated timestamps

 {fs/nfsd => Documentation/sunrpc/xdr}/nfs4_1.x     |   2 +
 fs/attr.c                                          |  10 +-
 fs/nfsd/Makefile                                   |   2 +-
 fs/nfsd/nfs4callback.c                             |  43 +++++++-
 fs/nfsd/nfs4state.c                                | 115 +++++++++++++++++++--
 fs/nfsd/nfs4xdr.c                                  |  53 +++++++++-
 fs/nfsd/nfs4xdr_gen.c                              |  12 +--
 fs/nfsd/nfsd.h                                     |   6 +-
 fs/nfsd/state.h                                    |   4 +-
 fs/nfsd/xdr4cb.h                                   |  10 +-
 include/linux/fs.h                                 |   1 +
 include/linux/nfs4.h                               |   7 +-
 include/linux/nfs_xdr.h                            |   5 -
 .../linux/sunrpc/xdrgen/nfs4_1.h                   |  14 ++-
 include/uapi/linux/nfs4.h                          |   7 +-
 15 files changed, 244 insertions(+), 47 deletions(-)
---
base-commit: 55f9aa30de14b6ec52940adeb4790c15247fed40
change-id: 20240815-delstid-93290691ad11

Best regards,
-- 
Jeff Layton <jlayton@xxxxxxxxxx>





[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux