Skip to content

Add NFSv4.2 POSIX ACL support to the client

[email protected] linux-nfs 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest8 patches 2 repliesIn review
  2. v17 patches 3 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8Add definitions for the POSIX draft ACL attributesinclude/linux/nfs4.h+37 -00 replies
2/8Add entries to the predefined client operations enuminclude/linux/nfs4.h+2 -00 replies
3/8Add new entries for handling POSIX draft ACLsinclude/linux/nfs_xdr.h+57 -00 replies
4/8Make posix_acl_from_nfsacl() globalfs/nfs_common/nfsacl.c include/linux/nfsacl.h+4 -10 replies
5/8Make three functions global and move them to acl.cfs/nfs/Makefile fs/nfs/nfs.h fs/nfs/nfs34acl.c +1 more+51 -380 replies
6/8Make nfs4_server_supports_acls() globalfs/nfs/nfs4_fs.h fs/nfs/nfs4proc.c include/linux/nfs_xdr.h+9 -10 replies
7/8Set SB_POSIXACL if the server supports the extensionfs/nfs/super.c+5 -02 replies
8/8Add support for the NFSv4.2 POSIX draft ACL attributesfs/nfs/nfs42proc.c fs/nfs/nfs42xdr.c fs/nfs/nfs4_fs.h +2 more+965 -20 replies

Reviews trailers per patch

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

Read the v2 thread

Cover letter [PATCH v2 0/8] Add NFSv4.2 POSIX ACL support to the client

From: Rick Macklem <[email protected]>

The Internet draft "POSIX Draft ACL support for Network File System Version 4, Minor Version2"
https://datatracker.ietf.org/doc/draft-ietf-nfsv4-posix-acls/
describes an extension to NFSv4.2 so that POSIX draft ACLs can get acquired and set directly, without using the loosey NFSv4->POSIX draft mapping algorith. It extends the protocol with four new attributes.

This patch series implements the client side of this extension for the nfs client. It is analogous to the NFSACL protocol used as a sideband protocol for NFSv3 and allows the ACLs to be acquired/set be getfacl(1)/setfacl(1).

The current implementation may not handle the "per file" scope, where individual file objects store/use either an NFSv4 ACL or a POSIX draft ACL. The only known file system that implements this is IBM's GPFS, and only if the "all" option is set for ACLs on it. Until a server implements this case, it will be difficult to implement correct client semantics for this case.

The last patch is rather large, but I would get either build failures or build warnings when I broke it up into smaller chunks.

The only changes from v1 is the addition of the 0001 patch from the server series, to make the kernel test robot happy and a small change to the calculation of NFS4_ACL_MAXPAGES.

Rick Macklem (8):
Add definitions for the POSIX draft ACL attributes Add entries to the predefined client operations enum Add new entries for handling POSIX draft ACLs Make posix_acl_from_nfsacl() global
Make three functions global and move them to acl.c Make nfs4_server_supports_acls() global
Set SB_POSIXACL if the server supports the extension Add support for the NFSv4.2 POSIX draft ACL attributes

 fs/nfs/Makefile         |   2 +-
 fs/nfs/nfs.h            |   3 +
 fs/nfs/nfs34acl.c       |  40 +++
 fs/nfs/nfs3acl.c        |  44 +--
 fs/nfs/nfs42proc.c      | 304 +++++++++++++++++++
 fs/nfs/nfs42xdr.c       | 642 ++++++++++++++++++++++++++++++++++++++++
 fs/nfs/nfs4_fs.h        |   9 +
 fs/nfs/nfs4proc.c       |  18 +-
 fs/nfs/nfs4xdr.c        |   2 +
 fs/nfs/super.c          |   5 +
 fs/nfs_common/nfsacl.c  |   3 +-
 include/linux/nfs4.h    |  39 +++
 include/linux/nfs_xdr.h |  59 ++++
 include/linux/nfsacl.h  |   2 +
 14 files changed, 1130 insertions(+), 42 deletions(-)
 create mode 100644 fs/nfs/nfs34acl.c
Signature · 1 line
2.49.0