mbox series

[00/14] server side user xattr support (RFC 8276)

Message ID 20200311195954.27117-1-fllinden@amazon.com (mailing list archive)
Headers show
Series server side user xattr support (RFC 8276) | expand

Message

Frank van der Linden March 11, 2020, 7:59 p.m. UTC
This patchset implements the server side for NFS user extended attributes,
as defined in RFC8726.

This was originally posted as an RFC in:

https://patchwork.kernel.org/cover/11143565/

Patch 1 is shared with the client side patch, posted
separately.

Most comments in there still apply, except that:

1. As per the discussion, user extended attributes are enabled if
   the client and server support them (e.g. they support 4.2 and
   advertise the user extended attribute FATTR). There are no longer
   options to switch them off on either the client or the server.
2. The code is no longer conditioned on a config option.
3. The number of patches has been reduced somewhat by merging
   smaller, related ones.

This has been tested as follows:

* Linux client and server:
	* Test all corner cases (XATTR_SIZE_*)
	* Test all failure cases (no xattr, setxattr with different or
	  invalid flags, etc).
	* Verify the content of xattrs across several operations.
	* Use KASAN and KMEMLEAK for a longer mix of testruns to verify
	  that there were no leaks (after unmounting the filesystem).

* Tested against the FreeBSD-current implementation as well, which works
  (after I fixed 2 bugs in that implementation, which I'm sending out to
  them too).

* Not tested: RDMA (I couldn't get a setup going).

Frank van der Linden (14):
  nfs,nfsd: NFSv4.2 extended attribute protocol definitions
  xattr: modify vfs_{set,remove}xattr for NFS server use
  nfsd: split off the write decode code in to a separate function
  nfsd: make sure the nfsd4_ops array has the right size
  nfsd: add defines for NFSv4.2 extended attribute support
  nfsd: define xattr functions to call in to their vfs counterparts
  nfsd: take xattr bits in to account for permission checks
  nfsd: add structure definitions for xattr requests / responses
  nfsd: use kvmalloc in svcxdr_tmpalloc
  nfsd: implement the xattr procedure functions.
  nfsd: add user xattr RPC XDR encoding/decoding logic
  nfsd: add xattr operations to ops array
  xattr: add a function to check if a namespace is supported
  nfsd: add fattr support for user extended attributes

 fs/nfsd/nfs4proc.c        | 141 +++++++++++-
 fs/nfsd/nfs4xdr.c         | 535 +++++++++++++++++++++++++++++++++++++++++++---
 fs/nfsd/nfsd.h            |   5 +-
 fs/nfsd/vfs.c             | 142 ++++++++++++
 fs/nfsd/vfs.h             |  10 +
 fs/nfsd/xdr4.h            |  31 +++
 fs/xattr.c                |  90 +++++++-
 include/linux/nfs4.h      |  22 +-
 include/linux/xattr.h     |   4 +
 include/uapi/linux/nfs4.h |   3 +
 10 files changed, 940 insertions(+), 43 deletions(-)