diff options
author | 2024-02-15 14:05:21 -0800 | |
---|---|---|
committer | 2024-03-01 09:12:31 -0500 | |
commit | 6487a13b5c6bee2ca3fc931f8ad28c8ae887a41f (patch) | |
tree | 6c793915341fad6bbe221d9d233c416f5337c6f1 /fs/nfsd/xdr4cb.h | |
parent | NFSD: Document the phases of CREATE_SESSION (diff) | |
download | linux-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.h | 18 |
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) |