aboutsummaryrefslogtreecommitdiff
path: root/fs/nfsd/xdr4cb.h
diff options
context:
space:
mode:
authorGravatar Dai Ngo <dai.ngo@oracle.com> 2024-02-15 14:05:21 -0800
committerGravatar Chuck Lever <chuck.lever@oracle.com> 2024-03-01 09:12:31 -0500
commit6487a13b5c6bee2ca3fc931f8ad28c8ae887a41f (patch)
tree6c793915341fad6bbe221d9d233c416f5337c6f1 /fs/nfsd/xdr4cb.h
parentNFSD: Document the phases of CREATE_SESSION (diff)
downloadlinux-6487a13b5c6bee2ca3fc931f8ad28c8ae887a41f.tar.gz
linux-6487a13b5c6bee2ca3fc931f8ad28c8ae887a41f.tar.bz2
linux-6487a13b5c6bee2ca3fc931f8ad28c8ae887a41f.zip
NFSD: add support for CB_GETATTR callback
Includes: . CB_GETATTR proc for nfs4_cb_procedures[] . XDR encoding and decoding function for CB_GETATTR request/reply . add nfs4_cb_fattr to nfs4_delegation for sending CB_GETATTR and store file attributes from client's reply. Signed-off-by: Dai Ngo <dai.ngo@oracle.com> Reviewed-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Diffstat (limited to 'fs/nfsd/xdr4cb.h')
-rw-r--r--fs/nfsd/xdr4cb.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/fs/nfsd/xdr4cb.h b/fs/nfsd/xdr4cb.h
index 0d39af1b00a0..e8b00309c449 100644
--- a/fs/nfsd/xdr4cb.h
+++ b/fs/nfsd/xdr4cb.h
@@ -54,3 +54,21 @@
#define NFS4_dec_cb_recall_any_sz (cb_compound_dec_hdr_sz + \
cb_sequence_dec_sz + \
op_dec_sz)
+
+/*
+ * 1: CB_GETATTR opcode (32-bit)
+ * N: file_handle
+ * 1: number of entry in attribute array (32-bit)
+ * 1: entry 0 in attribute array (32-bit)
+ */
+#define NFS4_enc_cb_getattr_sz (cb_compound_enc_hdr_sz + \
+ cb_sequence_enc_sz + \
+ 1 + enc_nfs4_fh_sz + 1 + 1)
+/*
+ * 4: fattr_bitmap_maxsz
+ * 1: attribute array len
+ * 2: change attr (64-bit)
+ * 2: size (64-bit)
+ */
+#define NFS4_dec_cb_getattr_sz (cb_compound_dec_hdr_sz + \
+ cb_sequence_dec_sz + 4 + 1 + 2 + 2 + op_dec_sz)