diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2007-07-17 21:52:42 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2007-07-19 15:09:04 -0400 |
commit | 9104a55dc382c4aae42dff3f54351085cbcb7317 (patch) | |
tree | 537a7ead6c0739d0c207acc7740d5b7209ea87ae /fs/nfs/nfs4xdr.c | |
parent | 9936781d0147e13cbc6df02f5265e0b9999ce3cf (diff) |
NFSv4: More NFSv4 xdr cleanups
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/nfs4xdr.c')
-rw-r--r-- | fs/nfs/nfs4xdr.c | 208 |
1 files changed, 134 insertions, 74 deletions
diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c index af959147077b..5eb92f1e2e10 100644 --- a/fs/nfs/nfs4xdr.c +++ b/fs/nfs/nfs4xdr.c | |||
@@ -72,10 +72,15 @@ static int nfs4_stat_to_errno(int); | |||
72 | */ | 72 | */ |
73 | #define open_owner_id_maxsz (1 + 4) | 73 | #define open_owner_id_maxsz (1 + 4) |
74 | #define lock_owner_id_maxsz (1 + 4) | 74 | #define lock_owner_id_maxsz (1 + 4) |
75 | #define decode_lockowner_maxsz (1 + XDR_QUADLEN(IDMAP_NAMESZ)) | ||
75 | #define compound_encode_hdr_maxsz (3 + (NFS4_MAXTAGLEN >> 2)) | 76 | #define compound_encode_hdr_maxsz (3 + (NFS4_MAXTAGLEN >> 2)) |
76 | #define compound_decode_hdr_maxsz (3 + (NFS4_MAXTAGLEN >> 2)) | 77 | #define compound_decode_hdr_maxsz (3 + (NFS4_MAXTAGLEN >> 2)) |
77 | #define op_encode_hdr_maxsz (1) | 78 | #define op_encode_hdr_maxsz (1) |
78 | #define op_decode_hdr_maxsz (2) | 79 | #define op_decode_hdr_maxsz (2) |
80 | #define encode_stateid_maxsz (XDR_QUADLEN(NFS4_STATEID_SIZE)) | ||
81 | #define decode_stateid_maxsz (XDR_QUADLEN(NFS4_STATEID_SIZE)) | ||
82 | #define encode_verifier_maxsz (XDR_QUADLEN(NFS4_VERIFIER_SIZE)) | ||
83 | #define decode_verifier_maxsz (XDR_QUADLEN(NFS4_VERIFIER_SIZE)) | ||
79 | #define encode_putfh_maxsz (op_encode_hdr_maxsz + 1 + \ | 84 | #define encode_putfh_maxsz (op_encode_hdr_maxsz + 1 + \ |
80 | (NFS4_FHSIZE >> 2)) | 85 | (NFS4_FHSIZE >> 2)) |
81 | #define decode_putfh_maxsz (op_decode_hdr_maxsz) | 86 | #define decode_putfh_maxsz (op_decode_hdr_maxsz) |
@@ -96,6 +101,11 @@ static int nfs4_stat_to_errno(int); | |||
96 | #define nfs4_fattr_maxsz (nfs4_fattr_bitmap_maxsz + \ | 101 | #define nfs4_fattr_maxsz (nfs4_fattr_bitmap_maxsz + \ |
97 | nfs4_fattr_value_maxsz) | 102 | nfs4_fattr_value_maxsz) |
98 | #define decode_getattr_maxsz (op_decode_hdr_maxsz + nfs4_fattr_maxsz) | 103 | #define decode_getattr_maxsz (op_decode_hdr_maxsz + nfs4_fattr_maxsz) |
104 | #define encode_attrs_maxsz (nfs4_fattr_bitmap_maxsz + \ | ||
105 | 1 + 2 + 1 + \ | ||
106 | nfs4_owner_maxsz + \ | ||
107 | nfs4_group_maxsz + \ | ||
108 | 4 + 4) | ||
99 | #define encode_savefh_maxsz (op_encode_hdr_maxsz) | 109 | #define encode_savefh_maxsz (op_encode_hdr_maxsz) |
100 | #define decode_savefh_maxsz (op_decode_hdr_maxsz) | 110 | #define decode_savefh_maxsz (op_decode_hdr_maxsz) |
101 | #define encode_restorefh_maxsz (op_encode_hdr_maxsz) | 111 | #define encode_restorefh_maxsz (op_encode_hdr_maxsz) |
@@ -123,7 +133,7 @@ static int nfs4_stat_to_errno(int); | |||
123 | #define decode_lookup_maxsz (op_decode_hdr_maxsz) | 133 | #define decode_lookup_maxsz (op_decode_hdr_maxsz) |
124 | #define encode_share_access_maxsz \ | 134 | #define encode_share_access_maxsz \ |
125 | (2) | 135 | (2) |
126 | #define encode_createmode_maxsz (1 + nfs4_fattr_maxsz) | 136 | #define encode_createmode_maxsz (1 + encode_attrs_maxsz) |
127 | #define encode_opentype_maxsz (1 + encode_createmode_maxsz) | 137 | #define encode_opentype_maxsz (1 + encode_createmode_maxsz) |
128 | #define encode_claim_null_maxsz (1 + nfs4_name_maxsz) | 138 | #define encode_claim_null_maxsz (1 + nfs4_name_maxsz) |
129 | #define encode_open_maxsz (op_encode_hdr_maxsz + \ | 139 | #define encode_open_maxsz (op_encode_hdr_maxsz + \ |
@@ -132,14 +142,52 @@ static int nfs4_stat_to_errno(int); | |||
132 | encode_opentype_maxsz + \ | 142 | encode_opentype_maxsz + \ |
133 | encode_claim_null_maxsz) | 143 | encode_claim_null_maxsz) |
134 | #define decode_ace_maxsz (3 + nfs4_owner_maxsz) | 144 | #define decode_ace_maxsz (3 + nfs4_owner_maxsz) |
135 | #define decode_delegation_maxsz (1 + XDR_QUADLEN(NFS4_STATEID_SIZE) + 1 + \ | 145 | #define decode_delegation_maxsz (1 + decode_stateid_maxsz + 1 + \ |
136 | decode_ace_maxsz) | 146 | decode_ace_maxsz) |
137 | #define decode_change_info_maxsz (5) | 147 | #define decode_change_info_maxsz (5) |
138 | #define decode_open_maxsz (op_decode_hdr_maxsz + \ | 148 | #define decode_open_maxsz (op_decode_hdr_maxsz + \ |
139 | XDR_QUADLEN(NFS4_STATEID_SIZE) + \ | 149 | decode_stateid_maxsz + \ |
140 | decode_change_info_maxsz + 1 + \ | 150 | decode_change_info_maxsz + 1 + \ |
141 | nfs4_fattr_bitmap_maxsz + \ | 151 | nfs4_fattr_bitmap_maxsz + \ |
142 | decode_delegation_maxsz) | 152 | decode_delegation_maxsz) |
153 | #define encode_open_confirm_maxsz \ | ||
154 | (op_encode_hdr_maxsz + \ | ||
155 | encode_stateid_maxsz + 1) | ||
156 | #define decode_open_confirm_maxsz \ | ||
157 | (op_decode_hdr_maxsz + \ | ||
158 | decode_stateid_maxsz) | ||
159 | #define encode_open_downgrade_maxsz \ | ||
160 | (op_encode_hdr_maxsz + \ | ||
161 | encode_stateid_maxsz + 1 + \ | ||
162 | encode_share_access_maxsz) | ||
163 | #define decode_open_downgrade_maxsz \ | ||
164 | (op_decode_hdr_maxsz + \ | ||
165 | decode_stateid_maxsz) | ||
166 | #define encode_close_maxsz (op_encode_hdr_maxsz + \ | ||
167 | 1 + encode_stateid_maxsz) | ||
168 | #define decode_close_maxsz (op_decode_hdr_maxsz + \ | ||
169 | decode_stateid_maxsz) | ||
170 | #define encode_setattr_maxsz (op_encode_hdr_maxsz + \ | ||
171 | encode_stateid_maxsz + \ | ||
172 | encode_attrs_maxsz) | ||
173 | #define decode_setattr_maxsz (op_decode_hdr_maxsz + \ | ||
174 | nfs4_fattr_bitmap_maxsz) | ||
175 | #define encode_read_maxsz (op_encode_hdr_maxsz + \ | ||
176 | encode_stateid_maxsz + 3) | ||
177 | #define decode_read_maxsz (op_decode_hdr_maxsz + 2) | ||
178 | #define encode_readdir_maxsz (op_encode_hdr_maxsz + \ | ||
179 | 2 + encode_verifier_maxsz + 5) | ||
180 | #define decode_readdir_maxsz (op_decode_hdr_maxsz + \ | ||
181 | decode_verifier_maxsz) | ||
182 | #define encode_readlink_maxsz (op_encode_hdr_maxsz) | ||
183 | #define decode_readlink_maxsz (op_decode_hdr_maxsz + 1) | ||
184 | #define encode_write_maxsz (op_encode_hdr_maxsz + \ | ||
185 | encode_stateid_maxsz + 4) | ||
186 | #define decode_write_maxsz (op_decode_hdr_maxsz + \ | ||
187 | 2 + decode_verifier_maxsz) | ||
188 | #define encode_commit_maxsz (op_encode_hdr_maxsz + 3) | ||
189 | #define decode_commit_maxsz (op_decode_hdr_maxsz + \ | ||
190 | decode_verifier_maxsz) | ||
143 | #define encode_remove_maxsz (op_encode_hdr_maxsz + \ | 191 | #define encode_remove_maxsz (op_encode_hdr_maxsz + \ |
144 | nfs4_name_maxsz) | 192 | nfs4_name_maxsz) |
145 | #define encode_rename_maxsz (op_encode_hdr_maxsz + \ | 193 | #define encode_rename_maxsz (op_encode_hdr_maxsz + \ |
@@ -148,19 +196,44 @@ static int nfs4_stat_to_errno(int); | |||
148 | #define encode_link_maxsz (op_encode_hdr_maxsz + \ | 196 | #define encode_link_maxsz (op_encode_hdr_maxsz + \ |
149 | nfs4_name_maxsz) | 197 | nfs4_name_maxsz) |
150 | #define decode_link_maxsz (op_decode_hdr_maxsz + 5) | 198 | #define decode_link_maxsz (op_decode_hdr_maxsz + 5) |
199 | #define encode_lock_maxsz (op_encode_hdr_maxsz + \ | ||
200 | 7 + \ | ||
201 | 1 + encode_stateid_maxsz + 8) | ||
202 | #define decode_lock_denied_maxsz \ | ||
203 | (8 + decode_lockowner_maxsz) | ||
204 | #define decode_lock_maxsz (op_decode_hdr_maxsz + \ | ||
205 | decode_lock_denied_maxsz) | ||
206 | #define encode_lockt_maxsz (op_encode_hdr_maxsz + 12) | ||
207 | #define decode_lockt_maxsz (op_decode_hdr_maxsz + \ | ||
208 | decode_lock_denied_maxsz) | ||
209 | #define encode_locku_maxsz (op_encode_hdr_maxsz + 3 + \ | ||
210 | encode_stateid_maxsz + \ | ||
211 | 4) | ||
212 | #define decode_locku_maxsz (op_decode_hdr_maxsz + \ | ||
213 | decode_stateid_maxsz) | ||
214 | #define encode_access_maxsz (op_encode_hdr_maxsz + 1) | ||
215 | #define decode_access_maxsz (op_decode_hdr_maxsz + 2) | ||
151 | #define encode_symlink_maxsz (op_encode_hdr_maxsz + \ | 216 | #define encode_symlink_maxsz (op_encode_hdr_maxsz + \ |
152 | 1 + nfs4_name_maxsz + \ | 217 | 1 + nfs4_name_maxsz + \ |
153 | 1 + \ | 218 | 1 + \ |
154 | nfs4_fattr_maxsz) | 219 | nfs4_fattr_maxsz) |
155 | #define decode_symlink_maxsz (op_decode_hdr_maxsz + 8) | 220 | #define decode_symlink_maxsz (op_decode_hdr_maxsz + 8) |
156 | #define encode_create_maxsz (op_encode_hdr_maxsz + \ | 221 | #define encode_create_maxsz (op_encode_hdr_maxsz + \ |
157 | 2 + nfs4_name_maxsz + \ | 222 | 1 + 2 + nfs4_name_maxsz + \ |
158 | nfs4_fattr_maxsz) | 223 | encode_attrs_maxsz) |
159 | #define decode_create_maxsz (op_decode_hdr_maxsz + \ | 224 | #define decode_create_maxsz (op_decode_hdr_maxsz + \ |
160 | decode_change_info_maxsz + \ | 225 | decode_change_info_maxsz + \ |
161 | nfs4_fattr_bitmap_maxsz) | 226 | nfs4_fattr_bitmap_maxsz) |
227 | #define encode_statfs_maxsz (encode_getattr_maxsz) | ||
228 | #define decode_statfs_maxsz (decode_getattr_maxsz) | ||
162 | #define encode_delegreturn_maxsz (op_encode_hdr_maxsz + 4) | 229 | #define encode_delegreturn_maxsz (op_encode_hdr_maxsz + 4) |
163 | #define decode_delegreturn_maxsz (op_decode_hdr_maxsz) | 230 | #define decode_delegreturn_maxsz (op_decode_hdr_maxsz) |
231 | #define encode_getacl_maxsz (encode_getattr_maxsz) | ||
232 | #define decode_getacl_maxsz (op_decode_hdr_maxsz + \ | ||
233 | nfs4_fattr_bitmap_maxsz + 1) | ||
234 | #define encode_setacl_maxsz (op_encode_hdr_maxsz + \ | ||
235 | encode_stateid_maxsz + 3) | ||
236 | #define decode_setacl_maxsz (decode_setattr_maxsz) | ||
164 | #define encode_fs_locations_maxsz \ | 237 | #define encode_fs_locations_maxsz \ |
165 | (encode_getattr_maxsz) | 238 | (encode_getattr_maxsz) |
166 | #define decode_fs_locations_maxsz \ | 239 | #define decode_fs_locations_maxsz \ |
@@ -169,37 +242,37 @@ static int nfs4_stat_to_errno(int); | |||
169 | #define NFS4_dec_compound_sz (1024) /* XXX: large enough? */ | 242 | #define NFS4_dec_compound_sz (1024) /* XXX: large enough? */ |
170 | #define NFS4_enc_read_sz (compound_encode_hdr_maxsz + \ | 243 | #define NFS4_enc_read_sz (compound_encode_hdr_maxsz + \ |
171 | encode_putfh_maxsz + \ | 244 | encode_putfh_maxsz + \ |
172 | op_encode_hdr_maxsz + 7) | 245 | encode_read_maxsz) |
173 | #define NFS4_dec_read_sz (compound_decode_hdr_maxsz + \ | 246 | #define NFS4_dec_read_sz (compound_decode_hdr_maxsz + \ |
174 | decode_putfh_maxsz + \ | 247 | decode_putfh_maxsz + \ |
175 | op_decode_hdr_maxsz + 2) | 248 | decode_read_maxsz) |
176 | #define NFS4_enc_readlink_sz (compound_encode_hdr_maxsz + \ | 249 | #define NFS4_enc_readlink_sz (compound_encode_hdr_maxsz + \ |
177 | encode_putfh_maxsz + \ | 250 | encode_putfh_maxsz + \ |
178 | op_encode_hdr_maxsz) | 251 | encode_readlink_maxsz) |
179 | #define NFS4_dec_readlink_sz (compound_decode_hdr_maxsz + \ | 252 | #define NFS4_dec_readlink_sz (compound_decode_hdr_maxsz + \ |
180 | decode_putfh_maxsz + \ | 253 | decode_putfh_maxsz + \ |
181 | op_decode_hdr_maxsz) | 254 | decode_readlink_maxsz) |
182 | #define NFS4_enc_readdir_sz (compound_encode_hdr_maxsz + \ | 255 | #define NFS4_enc_readdir_sz (compound_encode_hdr_maxsz + \ |
183 | encode_putfh_maxsz + \ | 256 | encode_putfh_maxsz + \ |
184 | op_encode_hdr_maxsz + 9) | 257 | encode_readdir_maxsz) |
185 | #define NFS4_dec_readdir_sz (compound_decode_hdr_maxsz + \ | 258 | #define NFS4_dec_readdir_sz (compound_decode_hdr_maxsz + \ |
186 | decode_putfh_maxsz + \ | 259 | decode_putfh_maxsz + \ |
187 | op_decode_hdr_maxsz + 2) | 260 | decode_readdir_maxsz) |
188 | #define NFS4_enc_write_sz (compound_encode_hdr_maxsz + \ | 261 | #define NFS4_enc_write_sz (compound_encode_hdr_maxsz + \ |
189 | encode_putfh_maxsz + \ | 262 | encode_putfh_maxsz + \ |
190 | op_encode_hdr_maxsz + 8 + \ | 263 | encode_write_maxsz + \ |
191 | encode_getattr_maxsz) | 264 | encode_getattr_maxsz) |
192 | #define NFS4_dec_write_sz (compound_decode_hdr_maxsz + \ | 265 | #define NFS4_dec_write_sz (compound_decode_hdr_maxsz + \ |
193 | decode_putfh_maxsz + \ | 266 | decode_putfh_maxsz + \ |
194 | op_decode_hdr_maxsz + 4 + \ | 267 | decode_write_maxsz + \ |
195 | decode_getattr_maxsz) | 268 | decode_getattr_maxsz) |
196 | #define NFS4_enc_commit_sz (compound_encode_hdr_maxsz + \ | 269 | #define NFS4_enc_commit_sz (compound_encode_hdr_maxsz + \ |
197 | encode_putfh_maxsz + \ | 270 | encode_putfh_maxsz + \ |
198 | op_encode_hdr_maxsz + 3 + \ | 271 | encode_commit_maxsz + \ |
199 | encode_getattr_maxsz) | 272 | encode_getattr_maxsz) |
200 | #define NFS4_dec_commit_sz (compound_decode_hdr_maxsz + \ | 273 | #define NFS4_dec_commit_sz (compound_decode_hdr_maxsz + \ |
201 | decode_putfh_maxsz + \ | 274 | decode_putfh_maxsz + \ |
202 | op_decode_hdr_maxsz + 2 + \ | 275 | decode_commit_maxsz + \ |
203 | decode_getattr_maxsz) | 276 | decode_getattr_maxsz) |
204 | #define NFS4_enc_open_sz (compound_encode_hdr_maxsz + \ | 277 | #define NFS4_enc_open_sz (compound_encode_hdr_maxsz + \ |
205 | encode_putfh_maxsz + \ | 278 | encode_putfh_maxsz + \ |
@@ -217,13 +290,14 @@ static int nfs4_stat_to_errno(int); | |||
217 | decode_getattr_maxsz + \ | 290 | decode_getattr_maxsz + \ |
218 | decode_restorefh_maxsz + \ | 291 | decode_restorefh_maxsz + \ |
219 | decode_getattr_maxsz) | 292 | decode_getattr_maxsz) |
220 | #define NFS4_enc_open_confirm_sz \ | 293 | #define NFS4_enc_open_confirm_sz \ |
221 | (compound_encode_hdr_maxsz + \ | 294 | (compound_encode_hdr_maxsz + \ |
222 | encode_putfh_maxsz + \ | 295 | encode_putfh_maxsz + \ |
223 | op_encode_hdr_maxsz + 5) | 296 | encode_open_confirm_maxsz) |
224 | #define NFS4_dec_open_confirm_sz (compound_decode_hdr_maxsz + \ | 297 | #define NFS4_dec_open_confirm_sz \ |
225 | decode_putfh_maxsz + \ | 298 | (compound_decode_hdr_maxsz + \ |
226 | op_decode_hdr_maxsz + 4) | 299 | decode_putfh_maxsz + \ |
300 | decode_open_confirm_maxsz) | ||
227 | #define NFS4_enc_open_noattr_sz (compound_encode_hdr_maxsz + \ | 301 | #define NFS4_enc_open_noattr_sz (compound_encode_hdr_maxsz + \ |
228 | encode_putfh_maxsz + \ | 302 | encode_putfh_maxsz + \ |
229 | encode_open_maxsz + \ | 303 | encode_open_maxsz + \ |
@@ -234,31 +308,30 @@ static int nfs4_stat_to_errno(int); | |||
234 | decode_getattr_maxsz) | 308 | decode_getattr_maxsz) |
235 | #define NFS4_enc_open_downgrade_sz \ | 309 | #define NFS4_enc_open_downgrade_sz \ |
236 | (compound_encode_hdr_maxsz + \ | 310 | (compound_encode_hdr_maxsz + \ |
237 | encode_putfh_maxsz + \ | 311 | encode_putfh_maxsz + \ |
238 | op_encode_hdr_maxsz + 7 + \ | 312 | encode_open_downgrade_maxsz + \ |
239 | encode_getattr_maxsz) | 313 | encode_getattr_maxsz) |
240 | #define NFS4_dec_open_downgrade_sz \ | 314 | #define NFS4_dec_open_downgrade_sz \ |
241 | (compound_decode_hdr_maxsz + \ | 315 | (compound_decode_hdr_maxsz + \ |
242 | decode_putfh_maxsz + \ | 316 | decode_putfh_maxsz + \ |
243 | op_decode_hdr_maxsz + 4 + \ | 317 | decode_open_downgrade_maxsz + \ |
244 | decode_getattr_maxsz) | 318 | decode_getattr_maxsz) |
245 | #define NFS4_enc_close_sz (compound_encode_hdr_maxsz + \ | 319 | #define NFS4_enc_close_sz (compound_encode_hdr_maxsz + \ |
246 | encode_putfh_maxsz + \ | 320 | encode_putfh_maxsz + \ |
247 | op_encode_hdr_maxsz + 5 + \ | 321 | encode_close_maxsz + \ |
248 | encode_getattr_maxsz) | 322 | encode_getattr_maxsz) |
249 | #define NFS4_dec_close_sz (compound_decode_hdr_maxsz + \ | 323 | #define NFS4_dec_close_sz (compound_decode_hdr_maxsz + \ |
250 | decode_putfh_maxsz + \ | 324 | decode_putfh_maxsz + \ |
251 | op_decode_hdr_maxsz + 4 + \ | 325 | decode_close_maxsz + \ |
252 | decode_getattr_maxsz) | 326 | decode_getattr_maxsz) |
253 | #define NFS4_enc_setattr_sz (compound_encode_hdr_maxsz + \ | 327 | #define NFS4_enc_setattr_sz (compound_encode_hdr_maxsz + \ |
254 | encode_putfh_maxsz + \ | 328 | encode_putfh_maxsz + \ |
255 | op_encode_hdr_maxsz + 4 + \ | 329 | encode_setattr_maxsz + \ |
256 | nfs4_fattr_maxsz + \ | 330 | encode_getattr_maxsz) |
257 | encode_getattr_maxsz) | 331 | #define NFS4_dec_setattr_sz (compound_decode_hdr_maxsz + \ |
258 | #define NFS4_dec_setattr_sz (compound_decode_hdr_maxsz + \ | 332 | decode_putfh_maxsz + \ |
259 | decode_putfh_maxsz + \ | 333 | decode_setattr_maxsz + \ |
260 | op_decode_hdr_maxsz + 3 + \ | 334 | decode_getattr_maxsz) |
261 | nfs4_fattr_maxsz) | ||
262 | #define NFS4_enc_fsinfo_sz (compound_encode_hdr_maxsz + \ | 335 | #define NFS4_enc_fsinfo_sz (compound_encode_hdr_maxsz + \ |
263 | encode_putfh_maxsz + \ | 336 | encode_putfh_maxsz + \ |
264 | encode_fsinfo_maxsz) | 337 | encode_fsinfo_maxsz) |
@@ -285,39 +358,28 @@ static int nfs4_stat_to_errno(int); | |||
285 | decode_fsinfo_maxsz) | 358 | decode_fsinfo_maxsz) |
286 | #define NFS4_enc_lock_sz (compound_encode_hdr_maxsz + \ | 359 | #define NFS4_enc_lock_sz (compound_encode_hdr_maxsz + \ |
287 | encode_putfh_maxsz + \ | 360 | encode_putfh_maxsz + \ |
288 | encode_getattr_maxsz + \ | 361 | encode_lock_maxsz) |
289 | op_encode_hdr_maxsz + \ | ||
290 | 1 + 1 + 2 + 2 + \ | ||
291 | 1 + 4 + 1 + 2 + \ | ||
292 | lock_owner_id_maxsz) | ||
293 | #define NFS4_dec_lock_sz (compound_decode_hdr_maxsz + \ | 362 | #define NFS4_dec_lock_sz (compound_decode_hdr_maxsz + \ |
294 | decode_putfh_maxsz + \ | 363 | decode_putfh_maxsz + \ |
295 | decode_getattr_maxsz + \ | 364 | decode_lock_maxsz) |
296 | op_decode_hdr_maxsz + \ | ||
297 | 2 + 2 + 1 + 2 + \ | ||
298 | lock_owner_id_maxsz) | ||
299 | #define NFS4_enc_lockt_sz (compound_encode_hdr_maxsz + \ | 365 | #define NFS4_enc_lockt_sz (compound_encode_hdr_maxsz + \ |
300 | encode_putfh_maxsz + \ | 366 | encode_putfh_maxsz + \ |
301 | encode_getattr_maxsz + \ | 367 | encode_lockt_maxsz) |
302 | op_encode_hdr_maxsz + \ | 368 | #define NFS4_dec_lockt_sz (compound_decode_hdr_maxsz + \ |
303 | 1 + 2 + 2 + 2 + \ | 369 | decode_putfh_maxsz + \ |
304 | lock_owner_id_maxsz) | 370 | decode_lockt_maxsz) |
305 | #define NFS4_dec_lockt_sz (NFS4_dec_lock_sz) | ||
306 | #define NFS4_enc_locku_sz (compound_encode_hdr_maxsz + \ | 371 | #define NFS4_enc_locku_sz (compound_encode_hdr_maxsz + \ |
307 | encode_putfh_maxsz + \ | 372 | encode_putfh_maxsz + \ |
308 | encode_getattr_maxsz + \ | 373 | encode_locku_maxsz) |
309 | op_encode_hdr_maxsz + \ | ||
310 | 1 + 1 + 4 + 2 + 2) | ||
311 | #define NFS4_dec_locku_sz (compound_decode_hdr_maxsz + \ | 374 | #define NFS4_dec_locku_sz (compound_decode_hdr_maxsz + \ |
312 | decode_putfh_maxsz + \ | 375 | decode_putfh_maxsz + \ |
313 | decode_getattr_maxsz + \ | 376 | decode_locku_maxsz) |
314 | op_decode_hdr_maxsz + 4) | ||
315 | #define NFS4_enc_access_sz (compound_encode_hdr_maxsz + \ | 377 | #define NFS4_enc_access_sz (compound_encode_hdr_maxsz + \ |
316 | encode_putfh_maxsz + \ | 378 | encode_putfh_maxsz + \ |
317 | op_encode_hdr_maxsz + 1) | 379 | encode_access_maxsz) |
318 | #define NFS4_dec_access_sz (compound_decode_hdr_maxsz + \ | 380 | #define NFS4_dec_access_sz (compound_decode_hdr_maxsz + \ |
319 | decode_putfh_maxsz + \ | 381 | decode_putfh_maxsz + \ |
320 | op_decode_hdr_maxsz + 2) | 382 | decode_access_maxsz) |
321 | #define NFS4_enc_getattr_sz (compound_encode_hdr_maxsz + \ | 383 | #define NFS4_enc_getattr_sz (compound_encode_hdr_maxsz + \ |
322 | encode_putfh_maxsz + \ | 384 | encode_putfh_maxsz + \ |
323 | encode_getattr_maxsz) | 385 | encode_getattr_maxsz) |
@@ -416,10 +478,10 @@ static int nfs4_stat_to_errno(int); | |||
416 | decode_getattr_maxsz) | 478 | decode_getattr_maxsz) |
417 | #define NFS4_enc_statfs_sz (compound_encode_hdr_maxsz + \ | 479 | #define NFS4_enc_statfs_sz (compound_encode_hdr_maxsz + \ |
418 | encode_putfh_maxsz + \ | 480 | encode_putfh_maxsz + \ |
419 | encode_getattr_maxsz) | 481 | encode_statfs_maxsz) |
420 | #define NFS4_dec_statfs_sz (compound_decode_hdr_maxsz + \ | 482 | #define NFS4_dec_statfs_sz (compound_decode_hdr_maxsz + \ |
421 | decode_putfh_maxsz + \ | 483 | decode_putfh_maxsz + \ |
422 | op_decode_hdr_maxsz + 12) | 484 | decode_statfs_maxsz) |
423 | #define NFS4_enc_server_caps_sz (compound_encode_hdr_maxsz + \ | 485 | #define NFS4_enc_server_caps_sz (compound_encode_hdr_maxsz + \ |
424 | encode_putfh_maxsz + \ | 486 | encode_putfh_maxsz + \ |
425 | encode_getattr_maxsz) | 487 | encode_getattr_maxsz) |
@@ -435,18 +497,16 @@ static int nfs4_stat_to_errno(int); | |||
435 | decode_getattr_maxsz) | 497 | decode_getattr_maxsz) |
436 | #define NFS4_enc_getacl_sz (compound_encode_hdr_maxsz + \ | 498 | #define NFS4_enc_getacl_sz (compound_encode_hdr_maxsz + \ |
437 | encode_putfh_maxsz + \ | 499 | encode_putfh_maxsz + \ |
438 | encode_getattr_maxsz) | 500 | encode_getacl_maxsz) |
439 | #define NFS4_dec_getacl_sz (compound_decode_hdr_maxsz + \ | 501 | #define NFS4_dec_getacl_sz (compound_decode_hdr_maxsz + \ |
440 | decode_putfh_maxsz + \ | 502 | decode_putfh_maxsz + \ |
441 | op_decode_hdr_maxsz + \ | 503 | decode_getacl_maxsz) |
442 | nfs4_fattr_bitmap_maxsz + 1) | ||
443 | #define NFS4_enc_setacl_sz (compound_encode_hdr_maxsz + \ | 504 | #define NFS4_enc_setacl_sz (compound_encode_hdr_maxsz + \ |
444 | encode_putfh_maxsz + \ | 505 | encode_putfh_maxsz + \ |
445 | op_encode_hdr_maxsz + 4 + \ | 506 | encode_setacl_maxsz) |
446 | nfs4_fattr_bitmap_maxsz + 1) | ||
447 | #define NFS4_dec_setacl_sz (compound_decode_hdr_maxsz + \ | 507 | #define NFS4_dec_setacl_sz (compound_decode_hdr_maxsz + \ |
448 | decode_putfh_maxsz + \ | 508 | decode_putfh_maxsz + \ |
449 | op_decode_hdr_maxsz + nfs4_fattr_bitmap_maxsz) | 509 | decode_setacl_maxsz) |
450 | #define NFS4_enc_fs_locations_sz \ | 510 | #define NFS4_enc_fs_locations_sz \ |
451 | (compound_encode_hdr_maxsz + \ | 511 | (compound_encode_hdr_maxsz + \ |
452 | encode_putfh_maxsz + \ | 512 | encode_putfh_maxsz + \ |