Skip to content

server side user xattr support (RFC 8276)

Frank van der Linden linux-fsdevel linux-nfs stable 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest10 patches 17 repliesIn review
  2. v211 patches 4 repliesSuperseded
  3. v1 RFC35 patches 9 repliesSuperseded

Changes in v3 from the cover letter

* Rebase to v5.8-rc2
* Use length probe + allocate + query for the listxattr and setxattr operations to avoid allocating unneeded space.
* Because of the above, drop the 'use kvmalloc for svcxdr_tmpalloc' patch, as it's no longer needed.

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/10xattr: break delegations in {set,remove}xattrfs/xattr.c include/linux/xattr.h+79 -75 replies
2/10xattr: add a function to check if a namespace is supportedfs/xattr.c include/linux/xattr.h+29 -06 replies
3/10nfs,nfsd: NFSv4.2 extended attribute protocol definitionsinclude/linux/nfs4.h include/uapi/linux/nfs4.h+23 -00 replies
4/10nfsd: split off the write decode code in to a separate functionfs/nfsd/nfs4xdr.c+42 -300 replies
5/10nfsd: add defines for NFSv4.2 extended attribute supportfs/nfsd/nfsd.h+4 -10 replies
6/10nfsd: define xattr functions to call in to their vfs counterpartsfs/nfsd/vfs.c fs/nfsd/vfs.h+237 -00 replies
7/10nfsd: take xattr bits in to account for permission checksfs/nfsd/nfs4proc.c fs/nfsd/vfs.c+19 -10 replies
8/10nfsd: add structure definitions for xattr requests / responsesfs/nfsd/xdr4.h+31 -00 replies
9/10nfsd: implement the xattr functions and en/decode logicfs/nfsd/nfs4proc.c fs/nfsd/nfs4xdr.c include/linux/nfs4.h+571 -10 replies
10/10nfsd: add fattr support for user extended attributesfs/nfsd/nfs4xdr.c+9 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.

Read the v3 thread

Cover letter [PATCH v3 00/10] server side user xattr support (RFC 8276)

v3:
* Rebase to v5.8-rc2
* Use length probe + allocate + query for the listxattr and setxattr operations to avoid allocating unneeded space.
* Because of the above, drop the 'use kvmalloc for svcxdr_tmpalloc' patch, as it's no longer needed.

v2:
* 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.
* The code is no longer conditioned on a config option.
* The number of patches has been reduced somewhat by merging smaller, related ones.
* Renamed some functions and added parameter comments as requested.

v1:

* Split in to client and server (changed from the original RFC patch).

Original RFC combined set is here:

https://www.spinics.net/lists/linux-nfs/msg74843.html

In general, these patches were, both server and client, tested as follows:
* stress-ng-xattr with 1000 workers
* 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).
* Interop run against FreeBSD server/client implementation.
* Ran xfstests-dev, with no unexpected/new failures as compared to an unpatched kernel. To fully use xfstests-dev, it needed some modifications, as it expects to either use all xattr namespaces, or none. Whereas NFS only suppors the "user." namespace (+ optional ACLs). I will send the changes in seperately.

Frank van der Linden (10):
xattr: break delegations in {set,remove}xattr
xattr: add a function to check if a namespace is supported nfs,nfsd: NFSv4.2 extended attribute protocol definitions
nfsd: split off the write decode code in to a separate function
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: implement the xattr functions and en/decode logic
nfsd: add fattr support for user extended attributes

 fs/nfsd/nfs4proc.c        | 128 ++++++++-
 fs/nfsd/nfs4xdr.c         | 531 +++++++++++++++++++++++++++++++++++---
 fs/nfsd/nfsd.h            |   5 +-
 fs/nfsd/vfs.c             | 239 +++++++++++++++++
 fs/nfsd/vfs.h             |  10 +
 fs/nfsd/xdr4.h            |  31 +++
 fs/xattr.c                | 111 +++++++-
 include/linux/nfs4.h      |  22 +-
 include/linux/xattr.h     |   4 +
 include/uapi/linux/nfs4.h |   3 +
 10 files changed, 1044 insertions(+), 40 deletions(-)
Signature · 1 line
2.17.2