diff options
Diffstat (limited to 'xlators/nfs/lib/src/msg-nfs3.c')
-rw-r--r-- | xlators/nfs/lib/src/msg-nfs3.c | 194 |
1 files changed, 106 insertions, 88 deletions
diff --git a/xlators/nfs/lib/src/msg-nfs3.c b/xlators/nfs/lib/src/msg-nfs3.c index 3eefd4c984d..9ad499364cf 100644 --- a/xlators/nfs/lib/src/msg-nfs3.c +++ b/xlators/nfs/lib/src/msg-nfs3.c @@ -56,7 +56,7 @@ xdr_to_mountpath (struct iovec outpath, struct iovec inmsg) goto ret; } - ret = xdr_decoded_length (xdr); + ret = nfs_xdr_decoded_length (xdr); ret: return ret; @@ -64,7 +64,7 @@ ret: ssize_t -xdr_serialize_generic (struct iovec outmsg, void *res, xdrproc_t proc) +nfs_xdr_serialize_generic (struct iovec outmsg, void *res, xdrproc_t proc) { ssize_t ret = -1; XDR xdr; @@ -80,7 +80,7 @@ xdr_serialize_generic (struct iovec outmsg, void *res, xdrproc_t proc) goto ret; } - ret = xdr_encoded_length (xdr); + ret = nfs_xdr_encoded_length (xdr); ret: return ret; @@ -88,7 +88,7 @@ ret: ssize_t -xdr_to_generic (struct iovec inmsg, void *args, xdrproc_t proc) +nfs_xdr_to_generic (struct iovec inmsg, void *args, xdrproc_t proc) { XDR xdr; ssize_t ret = -1; @@ -104,15 +104,15 @@ xdr_to_generic (struct iovec inmsg, void *args, xdrproc_t proc) goto ret; } - ret = xdr_decoded_length (xdr); + ret = nfs_xdr_decoded_length (xdr); ret: return ret; } ssize_t -xdr_to_generic_payload (struct iovec inmsg, void *args, xdrproc_t proc, - struct iovec *pendingpayload) +nfs_xdr_to_generic_payload (struct iovec inmsg, void *args, xdrproc_t proc, + struct iovec *pendingpayload) { XDR xdr; ssize_t ret = -1; @@ -128,11 +128,11 @@ xdr_to_generic_payload (struct iovec inmsg, void *args, xdrproc_t proc, goto ret; } - ret = xdr_decoded_length (xdr); + ret = nfs_xdr_decoded_length (xdr); if (pendingpayload) { - pendingpayload->iov_base = xdr_decoded_remaining_addr (xdr); - pendingpayload->iov_len = xdr_decoded_remaining_len (xdr); + pendingpayload->iov_base = nfs_xdr_decoded_remaining_addr (xdr); + pendingpayload->iov_len = nfs_xdr_decoded_remaining_len (xdr); } ret: @@ -147,135 +147,140 @@ ret: ssize_t xdr_serialize_mountres3 (struct iovec outmsg, mountres3 *res) { - return xdr_serialize_generic (outmsg, (void *)res, - (xdrproc_t)xdr_mountres3); + return nfs_xdr_serialize_generic (outmsg, (void *)res, + (xdrproc_t)xdr_mountres3); } ssize_t xdr_serialize_mountbody (struct iovec outmsg, mountbody *mb) { - return xdr_serialize_generic (outmsg, (void *)mb, - (xdrproc_t)xdr_mountbody); + return nfs_xdr_serialize_generic (outmsg, (void *)mb, + (xdrproc_t)xdr_mountbody); } ssize_t xdr_serialize_mountlist (struct iovec outmsg, mountlist *ml) { - return xdr_serialize_generic (outmsg, (void *)ml, - (xdrproc_t)xdr_mountlist); + return nfs_xdr_serialize_generic (outmsg, (void *)ml, + (xdrproc_t)xdr_mountlist); } ssize_t xdr_serialize_mountstat3 (struct iovec outmsg, mountstat3 *m) { - return xdr_serialize_generic (outmsg, (void *)m, - (xdrproc_t)xdr_mountstat3); + return nfs_xdr_serialize_generic (outmsg, (void *)m, + (xdrproc_t)xdr_mountstat3); } ssize_t xdr_to_getattr3args (struct iovec inmsg, getattr3args *ga) { - return xdr_to_generic (inmsg, (void *)ga,(xdrproc_t)xdr_getattr3args); + return nfs_xdr_to_generic (inmsg, (void *)ga, + (xdrproc_t)xdr_getattr3args); } ssize_t xdr_serialize_getattr3res (struct iovec outmsg, getattr3res *res) { - return xdr_serialize_generic (outmsg, (void *)res, - (xdrproc_t)xdr_getattr3res); + return nfs_xdr_serialize_generic (outmsg, (void *)res, + (xdrproc_t)xdr_getattr3res); } ssize_t xdr_serialize_setattr3res (struct iovec outmsg, setattr3res *res) { - return xdr_serialize_generic (outmsg, (void *)res, - (xdrproc_t)xdr_setattr3res); + return nfs_xdr_serialize_generic (outmsg, (void *)res, + (xdrproc_t)xdr_setattr3res); } ssize_t xdr_to_setattr3args (struct iovec inmsg, setattr3args *sa) { - return xdr_to_generic (inmsg, (void *)sa, (xdrproc_t)xdr_setattr3args); + return nfs_xdr_to_generic (inmsg, (void *)sa, + (xdrproc_t)xdr_setattr3args); } ssize_t xdr_serialize_lookup3res (struct iovec outmsg, lookup3res *res) { - return xdr_serialize_generic (outmsg, (void *)res, - (xdrproc_t)xdr_lookup3res); + return nfs_xdr_serialize_generic (outmsg, (void *)res, + (xdrproc_t)xdr_lookup3res); } ssize_t xdr_to_lookup3args (struct iovec inmsg, lookup3args *la) { - return xdr_to_generic (inmsg, (void *)la, (xdrproc_t)xdr_lookup3args); + return nfs_xdr_to_generic (inmsg, (void *)la, + (xdrproc_t)xdr_lookup3args); } ssize_t xdr_to_access3args (struct iovec inmsg, access3args *ac) { - return xdr_to_generic (inmsg,(void *)ac, (xdrproc_t)xdr_access3args); + return nfs_xdr_to_generic (inmsg,(void *)ac, + (xdrproc_t)xdr_access3args); } ssize_t xdr_serialize_access3res (struct iovec outmsg, access3res *res) { - return xdr_serialize_generic (outmsg, (void *)res, - (xdrproc_t)xdr_access3res); + return nfs_xdr_serialize_generic (outmsg, (void *)res, + (xdrproc_t)xdr_access3res); } ssize_t xdr_to_readlink3args (struct iovec inmsg, readlink3args *ra) { - return xdr_to_generic (inmsg, (void *)ra, (xdrproc_t)xdr_readlink3args); + return nfs_xdr_to_generic (inmsg, (void *)ra, + (xdrproc_t)xdr_readlink3args); } ssize_t xdr_serialize_readlink3res (struct iovec outmsg, readlink3res *res) { - return xdr_serialize_generic (outmsg, (void *)res, - (xdrproc_t)xdr_readlink3res); + return nfs_xdr_serialize_generic (outmsg, (void *)res, + (xdrproc_t)xdr_readlink3res); } ssize_t xdr_to_read3args (struct iovec inmsg, read3args *ra) { - return xdr_to_generic (inmsg, (void *)ra, (xdrproc_t)xdr_read3args); + return nfs_xdr_to_generic (inmsg, (void *)ra, (xdrproc_t)xdr_read3args); } ssize_t xdr_serialize_read3res (struct iovec outmsg, read3res *res) { - return xdr_serialize_generic (outmsg, (void *)res, - (xdrproc_t)xdr_read3res); + return nfs_xdr_serialize_generic (outmsg, (void *)res, + (xdrproc_t)xdr_read3res); } ssize_t xdr_serialize_read3res_nocopy (struct iovec outmsg, read3res *res) { - return xdr_serialize_generic (outmsg, (void *)res, - (xdrproc_t)xdr_read3res_nocopy); + return nfs_xdr_serialize_generic (outmsg, (void *)res, + (xdrproc_t)xdr_read3res_nocopy); } ssize_t xdr_to_write3args (struct iovec inmsg, write3args *wa) { - return xdr_to_generic (inmsg, (void *)wa,(xdrproc_t)xdr_write3args); + return nfs_xdr_to_generic (inmsg, (void *)wa,(xdrproc_t)xdr_write3args); } @@ -283,224 +288,237 @@ ssize_t xdr_to_write3args_nocopy (struct iovec inmsg, write3args *wa, struct iovec *payload) { - return xdr_to_generic_payload (inmsg, (void *)wa, - (xdrproc_t)xdr_write3args, payload); + return nfs_xdr_to_generic_payload (inmsg, (void *)wa, + (xdrproc_t)xdr_write3args, payload); } ssize_t xdr_serialize_write3res (struct iovec outmsg, write3res *res) { - return xdr_serialize_generic (outmsg, (void *)res, - (xdrproc_t)xdr_write3res); + return nfs_xdr_serialize_generic (outmsg, (void *)res, + (xdrproc_t)xdr_write3res); } ssize_t xdr_to_create3args (struct iovec inmsg, create3args *ca) { - return xdr_to_generic (inmsg, (void *)ca, (xdrproc_t)xdr_create3args); + return nfs_xdr_to_generic (inmsg, (void *)ca, + (xdrproc_t)xdr_create3args); } ssize_t xdr_serialize_create3res (struct iovec outmsg, create3res *res) { - return xdr_serialize_generic (outmsg, (void *)res, - (xdrproc_t)xdr_create3res); + return nfs_xdr_serialize_generic (outmsg, (void *)res, + (xdrproc_t)xdr_create3res); } ssize_t xdr_serialize_mkdir3res (struct iovec outmsg, mkdir3res *res) { - return xdr_serialize_generic (outmsg, (void *)res, - (xdrproc_t)xdr_mkdir3res); + return nfs_xdr_serialize_generic (outmsg, (void *)res, + (xdrproc_t)xdr_mkdir3res); } ssize_t xdr_to_mkdir3args (struct iovec inmsg, mkdir3args *ma) { - return xdr_to_generic (inmsg, (void *)ma, (xdrproc_t)xdr_mkdir3args); + return nfs_xdr_to_generic (inmsg, (void *)ma, + (xdrproc_t)xdr_mkdir3args); } ssize_t xdr_to_symlink3args (struct iovec inmsg, symlink3args *sa) { - return xdr_to_generic (inmsg, (void *)sa, (xdrproc_t)xdr_symlink3args); + return nfs_xdr_to_generic (inmsg, (void *)sa, + (xdrproc_t)xdr_symlink3args); } ssize_t xdr_serialize_symlink3res (struct iovec outmsg, symlink3res *res) { - return xdr_serialize_generic (outmsg, (void *)res, - (xdrproc_t)xdr_symlink3res); + return nfs_xdr_serialize_generic (outmsg, (void *)res, + (xdrproc_t)xdr_symlink3res); } ssize_t xdr_to_mknod3args (struct iovec inmsg, mknod3args *ma) { - return xdr_to_generic (inmsg, (void *)ma, (xdrproc_t)xdr_mknod3args); + return nfs_xdr_to_generic (inmsg, (void *)ma, + (xdrproc_t)xdr_mknod3args); } ssize_t xdr_serialize_mknod3res (struct iovec outmsg, mknod3res *res) { - return xdr_serialize_generic (outmsg, (void *)res, - (xdrproc_t)xdr_mknod3res); + return nfs_xdr_serialize_generic (outmsg, (void *)res, + (xdrproc_t)xdr_mknod3res); } ssize_t xdr_to_remove3args (struct iovec inmsg, remove3args *ra) { - return xdr_to_generic (inmsg, (void *)ra, (xdrproc_t)xdr_remove3args); + return nfs_xdr_to_generic (inmsg, (void *)ra, + (xdrproc_t)xdr_remove3args); } ssize_t xdr_serialize_remove3res (struct iovec outmsg, remove3res *res) { - return xdr_serialize_generic (outmsg, (void *)res, - (xdrproc_t)xdr_remove3res); + return nfs_xdr_serialize_generic (outmsg, (void *)res, + (xdrproc_t)xdr_remove3res); } ssize_t xdr_to_rmdir3args (struct iovec inmsg, rmdir3args *ra) { - return xdr_to_generic (inmsg, (void *)ra, (xdrproc_t)xdr_rmdir3args); + return nfs_xdr_to_generic (inmsg, (void *)ra, + (xdrproc_t)xdr_rmdir3args); } ssize_t xdr_serialize_rmdir3res (struct iovec outmsg, rmdir3res *res) { - return xdr_serialize_generic (outmsg, (void *)res, - (xdrproc_t)xdr_rmdir3res); + return nfs_xdr_serialize_generic (outmsg, (void *)res, + (xdrproc_t)xdr_rmdir3res); } ssize_t xdr_serialize_rename3res (struct iovec outmsg, rename3res *res) { - return xdr_serialize_generic (outmsg, (void *)res, - (xdrproc_t)xdr_rename3res); + return nfs_xdr_serialize_generic (outmsg, (void *)res, + (xdrproc_t)xdr_rename3res); } ssize_t xdr_to_rename3args (struct iovec inmsg, rename3args *ra) { - return xdr_to_generic (inmsg, (void *)ra, (xdrproc_t)xdr_rename3args); + return nfs_xdr_to_generic (inmsg, (void *)ra, + (xdrproc_t)xdr_rename3args); } ssize_t xdr_serialize_link3res (struct iovec outmsg, link3res *li) { - return xdr_serialize_generic (outmsg, (void *)li, - (xdrproc_t)xdr_link3res); + return nfs_xdr_serialize_generic (outmsg, (void *)li, + (xdrproc_t)xdr_link3res); } ssize_t xdr_to_link3args (struct iovec inmsg, link3args *la) { - return xdr_to_generic (inmsg, (void *)la, (xdrproc_t)xdr_link3args); + return nfs_xdr_to_generic (inmsg, (void *)la, (xdrproc_t)xdr_link3args); } ssize_t xdr_to_readdir3args (struct iovec inmsg, readdir3args *rd) { - return xdr_to_generic (inmsg, (void *)rd, (xdrproc_t)xdr_readdir3args); + return nfs_xdr_to_generic (inmsg, (void *)rd, + (xdrproc_t)xdr_readdir3args); } ssize_t xdr_serialize_readdir3res (struct iovec outmsg, readdir3res *res) { - return xdr_serialize_generic (outmsg, (void *)res, - (xdrproc_t)xdr_readdir3res); + return nfs_xdr_serialize_generic (outmsg, (void *)res, + (xdrproc_t)xdr_readdir3res); } ssize_t xdr_to_readdirp3args (struct iovec inmsg, readdirp3args *rp) { - return xdr_to_generic (inmsg, (void *)rp, (xdrproc_t)xdr_readdirp3args); + return nfs_xdr_to_generic (inmsg, (void *)rp, + (xdrproc_t)xdr_readdirp3args); } ssize_t xdr_serialize_readdirp3res (struct iovec outmsg, readdirp3res *res) { - return xdr_serialize_generic (outmsg, (void *)res, - (xdrproc_t)xdr_readdirp3res); + return nfs_xdr_serialize_generic (outmsg, (void *)res, + (xdrproc_t)xdr_readdirp3res); } ssize_t xdr_to_fsstat3args (struct iovec inmsg, fsstat3args *fa) { - return xdr_to_generic (inmsg, (void *)fa, (xdrproc_t)xdr_fsstat3args); + return nfs_xdr_to_generic (inmsg, (void *)fa, + (xdrproc_t)xdr_fsstat3args); } ssize_t xdr_serialize_fsstat3res (struct iovec outmsg, fsstat3res *res) { - return xdr_serialize_generic (outmsg, (void *)res, - (xdrproc_t)xdr_fsstat3res); + return nfs_xdr_serialize_generic (outmsg, (void *)res, + (xdrproc_t)xdr_fsstat3res); } ssize_t xdr_to_fsinfo3args (struct iovec inmsg, fsinfo3args *fi) { - return xdr_to_generic (inmsg, (void *)fi, (xdrproc_t)xdr_fsinfo3args); + return nfs_xdr_to_generic (inmsg, (void *)fi, + (xdrproc_t)xdr_fsinfo3args); } ssize_t xdr_serialize_fsinfo3res (struct iovec outmsg, fsinfo3res *res) { - return xdr_serialize_generic (outmsg, (void *)res, - (xdrproc_t)xdr_fsinfo3res); + return nfs_xdr_serialize_generic (outmsg, (void *)res, + (xdrproc_t)xdr_fsinfo3res); } ssize_t xdr_to_pathconf3args (struct iovec inmsg, pathconf3args *pc) { - return xdr_to_generic (inmsg, (void *)pc, (xdrproc_t)xdr_pathconf3args);} + return nfs_xdr_to_generic (inmsg, (void *)pc, + (xdrproc_t)xdr_pathconf3args);} ssize_t xdr_serialize_pathconf3res (struct iovec outmsg, pathconf3res *res) { - return xdr_serialize_generic (outmsg, (void *)res, - (xdrproc_t)xdr_pathconf3res); + return nfs_xdr_serialize_generic (outmsg, (void *)res, + (xdrproc_t)xdr_pathconf3res); } ssize_t xdr_to_commit3args (struct iovec inmsg, commit3args *ca) { - return xdr_to_generic (inmsg, (void *)ca, (xdrproc_t)xdr_commit3args); + return nfs_xdr_to_generic (inmsg, (void *)ca, + (xdrproc_t)xdr_commit3args); } ssize_t xdr_serialize_commit3res (struct iovec outmsg, commit3res *res) { - return xdr_serialize_generic (outmsg, (void *)res, - (xdrproc_t)xdr_commit3res); + return nfs_xdr_serialize_generic (outmsg, (void *)res, + (xdrproc_t)xdr_commit3res); } @@ -519,7 +537,7 @@ xdr_serialize_exports (struct iovec outmsg, exports *elist) if (!xdr_exports (&xdr, elist)) goto ret; - ret = xdr_decoded_length (xdr); + ret = nfs_xdr_decoded_length (xdr); ret: return ret; @@ -529,8 +547,8 @@ ret: ssize_t xdr_serialize_nfsstat3 (struct iovec outmsg, nfsstat3 *s) { - return xdr_serialize_generic (outmsg, (void *)s, - (xdrproc_t)xdr_nfsstat3); + return nfs_xdr_serialize_generic (outmsg, (void *)s, + (xdrproc_t)xdr_nfsstat3); } |