diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2010-12-14 09:56:42 -0500 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2010-12-16 12:37:23 -0500 |
commit | f5fc3c50c99a7df2bf908dfe66f112d35178ee07 (patch) | |
tree | 1bec43d578cb689bcb7d046805d61071f642930d /fs | |
parent | e4f9323409369a3aeb01885c0c4409d2eeec794a (diff) |
NFS: Switch in new NFSv3 decoder functions
The naming scheme of the new decoder functions, which follows the
NFSv4 XDR decoder functions, is slightly different than the scheme
used for the old functions. Rename the functions as a separate
step to keep the patches clean.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Tested-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/nfs/nfs3xdr.c | 64 |
1 files changed, 30 insertions, 34 deletions
diff --git a/fs/nfs/nfs3xdr.c b/fs/nfs/nfs3xdr.c index 0f07c6d55131..19c791101928 100644 --- a/fs/nfs/nfs3xdr.c +++ b/fs/nfs/nfs3xdr.c | |||
@@ -38,14 +38,10 @@ | |||
38 | #define NFS3_path_sz (1+(NFS3_MAXPATHLEN>>2)) | 38 | #define NFS3_path_sz (1+(NFS3_MAXPATHLEN>>2)) |
39 | #define NFS3_fattr_sz (21) | 39 | #define NFS3_fattr_sz (21) |
40 | #define NFS3_cookieverf_sz (NFS3_COOKIEVERFSIZE>>2) | 40 | #define NFS3_cookieverf_sz (NFS3_COOKIEVERFSIZE>>2) |
41 | #define NFS3_wcc_attr_sz (6) | 41 | #define NFS3_wcc_attr_sz (6) |
42 | #define NFS3_pre_op_attr_sz (1+NFS3_wcc_attr_sz) | 42 | #define NFS3_pre_op_attr_sz (1+NFS3_wcc_attr_sz) |
43 | #define NFS3_post_op_attr_sz (1+NFS3_fattr_sz) | 43 | #define NFS3_post_op_attr_sz (1+NFS3_fattr_sz) |
44 | #define NFS3_wcc_data_sz (NFS3_pre_op_attr_sz+NFS3_post_op_attr_sz) | 44 | #define NFS3_wcc_data_sz (NFS3_pre_op_attr_sz+NFS3_post_op_attr_sz) |
45 | #define NFS3_fsstat_sz | ||
46 | #define NFS3_fsinfo_sz | ||
47 | #define NFS3_pathconf_sz | ||
48 | #define NFS3_entry_sz (NFS3_filename_sz+3) | ||
49 | #define NFS3_diropargs_sz (NFS3_fh_sz+NFS3_filename_sz) | 45 | #define NFS3_diropargs_sz (NFS3_fh_sz+NFS3_filename_sz) |
50 | 46 | ||
51 | #define NFS3_getattrargs_sz (NFS3_fh_sz) | 47 | #define NFS3_getattrargs_sz (NFS3_fh_sz) |
@@ -66,9 +62,9 @@ | |||
66 | #define NFS3_readdirplusargs_sz (NFS3_fh_sz+NFS3_cookieverf_sz+4) | 62 | #define NFS3_readdirplusargs_sz (NFS3_fh_sz+NFS3_cookieverf_sz+4) |
67 | #define NFS3_commitargs_sz (NFS3_fh_sz+3) | 63 | #define NFS3_commitargs_sz (NFS3_fh_sz+3) |
68 | 64 | ||
69 | #define NFS3_attrstat_sz (1+NFS3_fattr_sz) | 65 | #define NFS3_getattrres_sz (1+NFS3_fattr_sz) |
70 | #define NFS3_wccstat_sz (1+NFS3_wcc_data_sz) | 66 | #define NFS3_setattrres_sz (1+NFS3_wcc_data_sz) |
71 | #define NFS3_removeres_sz (NFS3_wccstat_sz) | 67 | #define NFS3_removeres_sz (NFS3_setattrres_sz) |
72 | #define NFS3_lookupres_sz (1+NFS3_fh_sz+(2 * NFS3_post_op_attr_sz)) | 68 | #define NFS3_lookupres_sz (1+NFS3_fh_sz+(2 * NFS3_post_op_attr_sz)) |
73 | #define NFS3_accessres_sz (1+NFS3_post_op_attr_sz+1) | 69 | #define NFS3_accessres_sz (1+NFS3_post_op_attr_sz+1) |
74 | #define NFS3_readlinkres_sz (1+NFS3_post_op_attr_sz+1) | 70 | #define NFS3_readlinkres_sz (1+NFS3_post_op_attr_sz+1) |
@@ -3017,36 +3013,36 @@ out_default: | |||
3017 | [NFS3PROC_##proc] = { \ | 3013 | [NFS3PROC_##proc] = { \ |
3018 | .p_proc = NFS3PROC_##proc, \ | 3014 | .p_proc = NFS3PROC_##proc, \ |
3019 | .p_encode = (kxdrproc_t)nfs3_xdr_enc_##argtype##3args, \ | 3015 | .p_encode = (kxdrproc_t)nfs3_xdr_enc_##argtype##3args, \ |
3020 | .p_decode = (kxdrproc_t) nfs3_xdr_##restype, \ | 3016 | .p_decode = (kxdrproc_t)nfs3_xdr_dec_##restype##3res, \ |
3021 | .p_arglen = NFS3_##argtype##args_sz, \ | 3017 | .p_arglen = NFS3_##argtype##args_sz, \ |
3022 | .p_replen = NFS3_##restype##_sz, \ | 3018 | .p_replen = NFS3_##restype##res_sz, \ |
3023 | .p_timer = timer, \ | 3019 | .p_timer = timer, \ |
3024 | .p_statidx = NFS3PROC_##proc, \ | 3020 | .p_statidx = NFS3PROC_##proc, \ |
3025 | .p_name = #proc, \ | 3021 | .p_name = #proc, \ |
3026 | } | 3022 | } |
3027 | 3023 | ||
3028 | struct rpc_procinfo nfs3_procedures[] = { | 3024 | struct rpc_procinfo nfs3_procedures[] = { |
3029 | PROC(GETATTR, getattr, attrstat, 1), | 3025 | PROC(GETATTR, getattr, getattr, 1), |
3030 | PROC(SETATTR, setattr, wccstat, 0), | 3026 | PROC(SETATTR, setattr, setattr, 0), |
3031 | PROC(LOOKUP, lookup, lookupres, 2), | 3027 | PROC(LOOKUP, lookup, lookup, 2), |
3032 | PROC(ACCESS, access, accessres, 1), | 3028 | PROC(ACCESS, access, access, 1), |
3033 | PROC(READLINK, readlink, readlinkres, 3), | 3029 | PROC(READLINK, readlink, readlink, 3), |
3034 | PROC(READ, read, readres, 3), | 3030 | PROC(READ, read, read, 3), |
3035 | PROC(WRITE, write, writeres, 4), | 3031 | PROC(WRITE, write, write, 4), |
3036 | PROC(CREATE, create, createres, 0), | 3032 | PROC(CREATE, create, create, 0), |
3037 | PROC(MKDIR, mkdir, createres, 0), | 3033 | PROC(MKDIR, mkdir, create, 0), |
3038 | PROC(SYMLINK, symlink, createres, 0), | 3034 | PROC(SYMLINK, symlink, create, 0), |
3039 | PROC(MKNOD, mknod, createres, 0), | 3035 | PROC(MKNOD, mknod, create, 0), |
3040 | PROC(REMOVE, remove, removeres, 0), | 3036 | PROC(REMOVE, remove, remove, 0), |
3041 | PROC(RMDIR, lookup, wccstat, 0), | 3037 | PROC(RMDIR, lookup, setattr, 0), |
3042 | PROC(RENAME, rename, renameres, 0), | 3038 | PROC(RENAME, rename, rename, 0), |
3043 | PROC(LINK, link, linkres, 0), | 3039 | PROC(LINK, link, link, 0), |
3044 | PROC(READDIR, readdir, readdirres, 3), | 3040 | PROC(READDIR, readdir, readdir, 3), |
3045 | PROC(READDIRPLUS, readdirplus, readdirres, 3), | 3041 | PROC(READDIRPLUS, readdirplus, readdir, 3), |
3046 | PROC(FSSTAT, getattr, fsstatres, 0), | 3042 | PROC(FSSTAT, getattr, fsstat, 0), |
3047 | PROC(FSINFO, getattr, fsinfores, 0), | 3043 | PROC(FSINFO, getattr, fsinfo, 0), |
3048 | PROC(PATHCONF, getattr, pathconfres, 0), | 3044 | PROC(PATHCONF, getattr, pathconf, 0), |
3049 | PROC(COMMIT, commit, commitres, 5), | 3045 | PROC(COMMIT, commit, commit, 5), |
3050 | }; | 3046 | }; |
3051 | 3047 | ||
3052 | struct rpc_version nfs_version3 = { | 3048 | struct rpc_version nfs_version3 = { |
@@ -3060,7 +3056,7 @@ static struct rpc_procinfo nfs3_acl_procedures[] = { | |||
3060 | [ACLPROC3_GETACL] = { | 3056 | [ACLPROC3_GETACL] = { |
3061 | .p_proc = ACLPROC3_GETACL, | 3057 | .p_proc = ACLPROC3_GETACL, |
3062 | .p_encode = (kxdrproc_t)nfs3_xdr_enc_getacl3args, | 3058 | .p_encode = (kxdrproc_t)nfs3_xdr_enc_getacl3args, |
3063 | .p_decode = (kxdrproc_t) nfs3_xdr_getaclres, | 3059 | .p_decode = (kxdrproc_t)nfs3_xdr_dec_getacl3res, |
3064 | .p_arglen = ACL3_getaclargs_sz, | 3060 | .p_arglen = ACL3_getaclargs_sz, |
3065 | .p_replen = ACL3_getaclres_sz, | 3061 | .p_replen = ACL3_getaclres_sz, |
3066 | .p_timer = 1, | 3062 | .p_timer = 1, |
@@ -3069,7 +3065,7 @@ static struct rpc_procinfo nfs3_acl_procedures[] = { | |||
3069 | [ACLPROC3_SETACL] = { | 3065 | [ACLPROC3_SETACL] = { |
3070 | .p_proc = ACLPROC3_SETACL, | 3066 | .p_proc = ACLPROC3_SETACL, |
3071 | .p_encode = (kxdrproc_t)nfs3_xdr_enc_setacl3args, | 3067 | .p_encode = (kxdrproc_t)nfs3_xdr_enc_setacl3args, |
3072 | .p_decode = (kxdrproc_t) nfs3_xdr_setaclres, | 3068 | .p_decode = (kxdrproc_t)nfs3_xdr_dec_setacl3res, |
3073 | .p_arglen = ACL3_setaclargs_sz, | 3069 | .p_arglen = ACL3_setaclargs_sz, |
3074 | .p_replen = ACL3_setaclres_sz, | 3070 | .p_replen = ACL3_setaclres_sz, |
3075 | .p_timer = 0, | 3071 | .p_timer = 0, |