]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
NFSv4: Add a capability for delegated attributes
authorTrond Myklebust <trond.myklebust@primarydata.com>
Mon, 17 Jun 2024 01:21:27 +0000 (21:21 -0400)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Mon, 8 Jul 2024 17:47:25 +0000 (13:47 -0400)
Cache whether or not the server may have support for delegated
attributes in a capability flag.

Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Signed-off-by: Lance Shelton <lance.shelton@hammerspace.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
fs/nfs/nfs4proc.c
include/linux/nfs_fs_sb.h

index 34182a3c38a78326ad1f2ae7b0644b641620b562..03835c8a180f59333d0d33d6fd2a29ebaf9d8bc5 100644 (file)
@@ -3930,6 +3930,8 @@ static int _nfs4_server_capabilities(struct nfs_server *server, struct nfs_fh *f
 #endif
                if (res.attr_bitmask[0] & FATTR4_WORD0_FS_LOCATIONS)
                        server->caps |= NFS_CAP_FS_LOCATIONS;
+               if (res.attr_bitmask[2] & FATTR4_WORD2_TIME_DELEG_MODIFY)
+                       server->caps |= NFS_CAP_DELEGTIME;
                if (!(res.attr_bitmask[0] & FATTR4_WORD0_FILEID))
                        server->fattr_valid &= ~NFS_ATTR_FATTR_FILEID;
                if (!(res.attr_bitmask[1] & FATTR4_WORD1_MODE))
index 92de074e63b98c03cefbb2f07d60de0b8f1fb039..5a76a87cd924440090ff00094afb72427b0f65b1 100644 (file)
@@ -278,6 +278,7 @@ struct nfs_server {
 #define NFS_CAP_LGOPEN         (1U << 5)
 #define NFS_CAP_CASE_INSENSITIVE       (1U << 6)
 #define NFS_CAP_CASE_PRESERVING        (1U << 7)
+#define NFS_CAP_DELEGTIME      (1U << 13)
 #define NFS_CAP_POSIX_LOCK     (1U << 14)
 #define NFS_CAP_UIDGID_NOMAP   (1U << 15)
 #define NFS_CAP_STATEID_NFSV41 (1U << 16)