Linux 4.18.10
[linux/fpc-iii.git] / fs / nfsd / xdr4cb.h
blob517239af03027c176eeb9dd73e2c08a0ed9d43bd
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #define NFS4_MAXTAGLEN 20
4 #define NFS4_enc_cb_null_sz 0
5 #define NFS4_dec_cb_null_sz 0
6 #define cb_compound_enc_hdr_sz 4
7 #define cb_compound_dec_hdr_sz (3 + (NFS4_MAXTAGLEN >> 2))
8 #define sessionid_sz (NFS4_MAX_SESSIONID_LEN >> 2)
9 #define cb_sequence_enc_sz (sessionid_sz + 4 + \
10 1 /* no referring calls list yet */)
11 #define cb_sequence_dec_sz (op_dec_sz + sessionid_sz + 4)
13 #define op_enc_sz 1
14 #define op_dec_sz 2
15 #define enc_nfs4_fh_sz (1 + (NFS4_FHSIZE >> 2))
16 #define enc_stateid_sz (NFS4_STATEID_SIZE >> 2)
17 #define NFS4_enc_cb_recall_sz (cb_compound_enc_hdr_sz + \
18 cb_sequence_enc_sz + \
19 1 + enc_stateid_sz + \
20 enc_nfs4_fh_sz)
22 #define NFS4_dec_cb_recall_sz (cb_compound_dec_hdr_sz + \
23 cb_sequence_dec_sz + \
24 op_dec_sz)
25 #define NFS4_enc_cb_layout_sz (cb_compound_enc_hdr_sz + \
26 cb_sequence_enc_sz + \
27 1 + 3 + \
28 enc_nfs4_fh_sz + 4)
29 #define NFS4_dec_cb_layout_sz (cb_compound_dec_hdr_sz + \
30 cb_sequence_dec_sz + \
31 op_dec_sz)
33 #define NFS4_enc_cb_notify_lock_sz (cb_compound_enc_hdr_sz + \
34 cb_sequence_enc_sz + \
35 2 + 1 + \
36 XDR_QUADLEN(NFS4_OPAQUE_LIMIT) + \
37 enc_nfs4_fh_sz)
38 #define NFS4_dec_cb_notify_lock_sz (cb_compound_dec_hdr_sz + \
39 cb_sequence_dec_sz + \
40 op_dec_sz)