|
7 | 7 |
|
8 | 8 | #include "nfs42.h" |
9 | 9 |
|
| 10 | +/* Not limited by NFS itself, limited by the generic xattr code */ |
| 11 | +#define nfs4_xattr_name_maxsz XDR_QUADLEN(XATTR_NAME_MAX) |
| 12 | + |
10 | 13 | #define encode_fallocate_maxsz (encode_stateid_maxsz + \ |
11 | 14 | 2 /* offset */ + \ |
12 | 15 | 2 /* length */) |
|
89 | 92 | 2 /* dst offset */ + \ |
90 | 93 | 2 /* count */) |
91 | 94 | #define decode_clone_maxsz (op_decode_hdr_maxsz) |
| 95 | +#define encode_getxattr_maxsz (op_encode_hdr_maxsz + 1 + \ |
| 96 | + nfs4_xattr_name_maxsz) |
| 97 | +#define decode_getxattr_maxsz (op_decode_hdr_maxsz + 1 + pagepad_maxsz) |
| 98 | +#define encode_setxattr_maxsz (op_encode_hdr_maxsz + \ |
| 99 | + 1 + nfs4_xattr_name_maxsz + 1) |
| 100 | +#define decode_setxattr_maxsz (op_decode_hdr_maxsz + decode_change_info_maxsz) |
| 101 | +#define encode_listxattrs_maxsz (op_encode_hdr_maxsz + 2 + 1) |
| 102 | +#define decode_listxattrs_maxsz (op_decode_hdr_maxsz + 2 + 1 + 1 + 1) |
| 103 | +#define encode_removexattr_maxsz (op_encode_hdr_maxsz + 1 + \ |
| 104 | + nfs4_xattr_name_maxsz) |
| 105 | +#define decode_removexattr_maxsz (op_decode_hdr_maxsz + \ |
| 106 | + decode_change_info_maxsz) |
92 | 107 |
|
93 | 108 | #define NFS4_enc_allocate_sz (compound_encode_hdr_maxsz + \ |
94 | 109 | encode_sequence_maxsz + \ |
|
186 | 201 | decode_putfh_maxsz + \ |
187 | 202 | decode_clone_maxsz + \ |
188 | 203 | decode_getattr_maxsz) |
189 | | - |
190 | | -/* Not limited by NFS itself, limited by the generic xattr code */ |
191 | | -#define nfs4_xattr_name_maxsz XDR_QUADLEN(XATTR_NAME_MAX) |
192 | | - |
193 | | -#define encode_getxattr_maxsz (op_encode_hdr_maxsz + 1 + \ |
194 | | - nfs4_xattr_name_maxsz) |
195 | | -#define decode_getxattr_maxsz (op_decode_hdr_maxsz + 1 + pagepad_maxsz) |
196 | | -#define encode_setxattr_maxsz (op_encode_hdr_maxsz + \ |
197 | | - 1 + nfs4_xattr_name_maxsz + 1) |
198 | | -#define decode_setxattr_maxsz (op_decode_hdr_maxsz + decode_change_info_maxsz) |
199 | | -#define encode_listxattrs_maxsz (op_encode_hdr_maxsz + 2 + 1) |
200 | | -#define decode_listxattrs_maxsz (op_decode_hdr_maxsz + 2 + 1 + 1 + 1) |
201 | | -#define encode_removexattr_maxsz (op_encode_hdr_maxsz + 1 + \ |
202 | | - nfs4_xattr_name_maxsz) |
203 | | -#define decode_removexattr_maxsz (op_decode_hdr_maxsz + \ |
204 | | - decode_change_info_maxsz) |
205 | | - |
206 | | -#define NFS4_enc_getxattr_sz (compound_encode_hdr_maxsz + \ |
207 | | - encode_sequence_maxsz + \ |
208 | | - encode_putfh_maxsz + \ |
209 | | - encode_getxattr_maxsz) |
210 | | -#define NFS4_dec_getxattr_sz (compound_decode_hdr_maxsz + \ |
211 | | - decode_sequence_maxsz + \ |
212 | | - decode_putfh_maxsz + \ |
213 | | - decode_getxattr_maxsz) |
214 | | -#define NFS4_enc_setxattr_sz (compound_encode_hdr_maxsz + \ |
215 | | - encode_sequence_maxsz + \ |
216 | | - encode_putfh_maxsz + \ |
217 | | - encode_setxattr_maxsz) |
218 | | -#define NFS4_dec_setxattr_sz (compound_decode_hdr_maxsz + \ |
219 | | - decode_sequence_maxsz + \ |
220 | | - decode_putfh_maxsz + \ |
221 | | - decode_setxattr_maxsz) |
222 | | -#define NFS4_enc_listxattrs_sz (compound_encode_hdr_maxsz + \ |
223 | | - encode_sequence_maxsz + \ |
224 | | - encode_putfh_maxsz + \ |
225 | | - encode_listxattrs_maxsz) |
226 | | -#define NFS4_dec_listxattrs_sz (compound_decode_hdr_maxsz + \ |
227 | | - decode_sequence_maxsz + \ |
228 | | - decode_putfh_maxsz + \ |
229 | | - decode_listxattrs_maxsz) |
230 | | -#define NFS4_enc_removexattr_sz (compound_encode_hdr_maxsz + \ |
231 | | - encode_sequence_maxsz + \ |
232 | | - encode_putfh_maxsz + \ |
233 | | - encode_removexattr_maxsz) |
234 | | -#define NFS4_dec_removexattr_sz (compound_decode_hdr_maxsz + \ |
235 | | - decode_sequence_maxsz + \ |
236 | | - decode_putfh_maxsz + \ |
237 | | - decode_removexattr_maxsz) |
| 204 | +#define NFS4_enc_getxattr_sz (compound_encode_hdr_maxsz + \ |
| 205 | + encode_sequence_maxsz + \ |
| 206 | + encode_putfh_maxsz + \ |
| 207 | + encode_getxattr_maxsz) |
| 208 | +#define NFS4_dec_getxattr_sz (compound_decode_hdr_maxsz + \ |
| 209 | + decode_sequence_maxsz + \ |
| 210 | + decode_putfh_maxsz + \ |
| 211 | + decode_getxattr_maxsz) |
| 212 | +#define NFS4_enc_setxattr_sz (compound_encode_hdr_maxsz + \ |
| 213 | + encode_sequence_maxsz + \ |
| 214 | + encode_putfh_maxsz + \ |
| 215 | + encode_setxattr_maxsz) |
| 216 | +#define NFS4_dec_setxattr_sz (compound_decode_hdr_maxsz + \ |
| 217 | + decode_sequence_maxsz + \ |
| 218 | + decode_putfh_maxsz + \ |
| 219 | + decode_setxattr_maxsz) |
| 220 | +#define NFS4_enc_listxattrs_sz (compound_encode_hdr_maxsz + \ |
| 221 | + encode_sequence_maxsz + \ |
| 222 | + encode_putfh_maxsz + \ |
| 223 | + encode_listxattrs_maxsz) |
| 224 | +#define NFS4_dec_listxattrs_sz (compound_decode_hdr_maxsz + \ |
| 225 | + decode_sequence_maxsz + \ |
| 226 | + decode_putfh_maxsz + \ |
| 227 | + decode_listxattrs_maxsz) |
| 228 | +#define NFS4_enc_removexattr_sz (compound_encode_hdr_maxsz + \ |
| 229 | + encode_sequence_maxsz + \ |
| 230 | + encode_putfh_maxsz + \ |
| 231 | + encode_removexattr_maxsz) |
| 232 | +#define NFS4_dec_removexattr_sz (compound_decode_hdr_maxsz + \ |
| 233 | + decode_sequence_maxsz + \ |
| 234 | + decode_putfh_maxsz + \ |
| 235 | + decode_removexattr_maxsz) |
238 | 236 |
|
239 | 237 | /* |
240 | 238 | * These values specify the maximum amount of data that is not |
|
0 commit comments