summaryrefslogtreecommitdiff
path: root/fs/nfsd/xdr4cb.h
diff options
context:
space:
mode:
authorDai Ngo <dai.ngo@oracle.com>2023-09-13 16:38:20 -0700
committerChuck Lever <chuck.lever@oracle.com>2023-10-16 12:44:08 -0400
commit738401a9bd1ac34ccd5723d69640a4adbb1a4bc0 (patch)
tree3c6cc4f0f2f87b7feb4f7b794c92d0ebb4ccdd2a /fs/nfsd/xdr4cb.h
parent15d39883ee7dfc023d8a24f5d4b58100e1d04ad9 (diff)
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)