summaryrefslogtreecommitdiffstats
path: root/xlators/nfs/server
diff options
context:
space:
mode:
authorShehjar Tikoo <shehjart@gluster.com>2010-08-10 02:41:54 +0000
committerAnand V. Avati <avati@dev.gluster.com>2010-08-10 02:44:22 -0700
commit0af39ff8d03173a7ba3df1b13476b7ed447131aa (patch)
tree2180ff57269b73aa8fee6a5802a8d5d4a169f624 /xlators/nfs/server
parentb0304d47f67aa8fa677e4898fa46b96df88c8322 (diff)
nfs, nfs/rpc: Rename functions to prevent gfrpcsvc conflict
Signed-off-by: Shehjar Tikoo <shehjart@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 1274 (nfs fails to start) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1274
Diffstat (limited to 'xlators/nfs/server')
-rw-r--r--xlators/nfs/server/src/mount3.c75
-rw-r--r--xlators/nfs/server/src/nfs.c12
-rw-r--r--xlators/nfs/server/src/nfs3-helpers.c2
-rw-r--r--xlators/nfs/server/src/nfs3.c439
4 files changed, 272 insertions, 256 deletions
diff --git a/xlators/nfs/server/src/mount3.c b/xlators/nfs/server/src/mount3.c
index b943d1290c3..97f713a757e 100644
--- a/xlators/nfs/server/src/mount3.c
+++ b/xlators/nfs/server/src/mount3.c
@@ -58,7 +58,7 @@ mnt3svc_submit_reply (rpcsvc_request_t *req, void *arg, mnt3_serializer sfunc)
if (!req)
return -1;
- ms = (struct mount3_state *)rpcsvc_request_program_private (req);
+ ms = (struct mount3_state *)nfs_rpcsvc_request_program_private (req);
if (!ms) {
gf_log (GF_MNT, GF_LOG_ERROR, "mount state not found");
goto ret;
@@ -80,7 +80,7 @@ mnt3svc_submit_reply (rpcsvc_request_t *req, void *arg, mnt3_serializer sfunc)
outmsg.iov_len = sfunc (outmsg, arg);
/* Then, submit the message for transmission. */
- ret = rpcsvc_submit_message (req, outmsg, iob);
+ ret = nfs_rpcsvc_submit_message (req, outmsg, iob);
iobuf_unref (iob);
if (ret == -1) {
gf_log (GF_MNT, GF_LOG_ERROR, "Reply submission failed");
@@ -183,7 +183,8 @@ mnt3svc_update_mountlist (struct mount3_state *ms, rpcsvc_request_t *req,
if ((!ms) || (!req) || (!expname))
return -1;
- me = (struct mountentry *)GF_CALLOC (1, sizeof (*me), gf_nfs_mt_mountentry);
+ me = (struct mountentry *)GF_CALLOC (1, sizeof (*me),
+ gf_nfs_mt_mountentry);
if (!me)
return -1;
@@ -192,7 +193,7 @@ mnt3svc_update_mountlist (struct mount3_state *ms, rpcsvc_request_t *req,
/* Must get the IP or hostname of the client so we
* can map it into the mount entry.
*/
- ret = rpcsvc_conn_peername (req->conn, me->hostname, MNTPATHLEN);
+ ret = nfs_rpcsvc_conn_peername (req->conn, me->hostname, MNTPATHLEN);
if (ret == -1)
goto free_err;
@@ -230,7 +231,7 @@ mnt3svc_lookup_mount_cbk (call_frame_t *frame, void *cookie,
if (!req)
return -1;
- ms = (struct mount3_state *)rpcsvc_request_program_private (req);
+ ms = (struct mount3_state *)nfs_rpcsvc_request_program_private (req);
if (!ms) {
gf_log (GF_MNT, GF_LOG_ERROR, "mount state not found");
op_ret = -1;
@@ -248,8 +249,9 @@ mnt3svc_lookup_mount_cbk (call_frame_t *frame, void *cookie,
xmit_res:
gf_log (GF_MNT, GF_LOG_DEBUG, "Mount reply status: %d", status);
if (op_ret == 0) {
- svc = rpcsvc_request_service (req);
- autharrlen = rpcsvc_auth_array (svc, this->name, autharr, 10);
+ svc = nfs_rpcsvc_request_service (req);
+ autharrlen = nfs_rpcsvc_auth_array (svc, this->name, autharr,
+ 10);
}
res = mnt3svc_set_mountres3 (status, &fh, autharr, autharrlen);
@@ -506,8 +508,9 @@ err:
if (op_ret == -1) {
gf_log (GF_MNT, GF_LOG_DEBUG, "Mount reply status: %d",
mntstat);
- svc = rpcsvc_request_service (mres->req);
- autharrlen = rpcsvc_auth_array (svc, this->name, autharr, 10);
+ svc = nfs_rpcsvc_request_service (mres->req);
+ autharrlen = nfs_rpcsvc_auth_array (svc, this->name, autharr,
+ 10);
res = mnt3svc_set_mountres3 (mntstat, &fh, autharr, autharrlen);
mnt3svc_submit_reply (mres->req, (void *)&res,
@@ -661,16 +664,16 @@ mnt3_check_client_net (struct mount3_state *ms, rpcsvc_request_t *req,
if ((!ms) || (!req) || (!targetxl))
return -1;
- svc = rpcsvc_request_service (req);
- ret = rpcsvc_conn_peer_check (svc->options, targetxl->name,
- rpcsvc_request_conn (req));
+ svc = nfs_rpcsvc_request_service (req);
+ ret = nfs_rpcsvc_conn_peer_check (svc->options, targetxl->name,
+ nfs_rpcsvc_request_conn (req));
if (ret == RPCSVC_AUTH_REJECT) {
gf_log (GF_MNT, GF_LOG_TRACE, "Peer not allowed");
goto err;
}
- ret = rpcsvc_conn_privport_check (svc, targetxl->name,
- rpcsvc_request_conn (req));
+ ret = nfs_rpcsvc_conn_privport_check (svc, targetxl->name,
+ nfs_rpcsvc_request_conn (req));
if (ret == RPCSVC_AUTH_REJECT) {
gf_log (GF_MNT, GF_LOG_TRACE, "Unprivileged port not allowed");
goto err;
@@ -700,14 +703,14 @@ mnt3svc_mnt (rpcsvc_request_t *req)
ret = xdr_to_mountpath (pvec, req->msg);
if (ret == -1) {
gf_log (GF_MNT, GF_LOG_ERROR, "Failed to decode args");
- rpcsvc_request_seterr (req, GARBAGE_ARGS);
+ nfs_rpcsvc_request_seterr (req, GARBAGE_ARGS);
goto rpcerr;
}
- ms = (struct mount3_state *)rpcsvc_request_program_private (req);
+ ms = (struct mount3_state *)nfs_rpcsvc_request_program_private (req);
if (!ms) {
gf_log (GF_MNT, GF_LOG_ERROR, "Mount state not present");
- rpcsvc_request_seterr (req, SYSTEM_ERR);
+ nfs_rpcsvc_request_seterr (req, SYSTEM_ERR);
ret = -1;
goto rpcerr;
}
@@ -753,7 +756,7 @@ mnt3svc_null (rpcsvc_request_t *req)
return 0;
}
- rpcsvc_submit_generic (req, dummyvec, NULL);
+ nfs_rpcsvc_submit_generic (req, dummyvec, NULL);
return 0;
}
@@ -859,9 +862,9 @@ mnt3svc_dump (rpcsvc_request_t *req)
if (!req)
return -1;
- ms = (struct mount3_state *)rpcsvc_request_program_private (req);
+ ms = (struct mount3_state *)nfs_rpcsvc_request_program_private (req);
if (!ms) {
- rpcsvc_request_seterr (req, SYSTEM_ERR);
+ nfs_rpcsvc_request_seterr (req, SYSTEM_ERR);
goto rpcerr;
}
@@ -871,7 +874,7 @@ mnt3svc_dump (rpcsvc_request_t *req)
sfunc = (mnt3_serializer)xdr_serialize_mountlist;
if (!mlist) {
if (ret != 0) {
- rpcsvc_request_seterr (req, SYSTEM_ERR);
+ nfs_rpcsvc_request_seterr (req, SYSTEM_ERR);
ret = -1;
goto rpcerr;
} else {
@@ -975,19 +978,19 @@ mnt3svc_umnt (rpcsvc_request_t *req)
ret = xdr_to_mountpath (pvec, req->msg);;
if (ret == -1) {
gf_log (GF_MNT, GF_LOG_ERROR, "Failed decode args");
- rpcsvc_request_seterr (req, GARBAGE_ARGS);
+ nfs_rpcsvc_request_seterr (req, GARBAGE_ARGS);
goto rpcerr;
}
- ms = (struct mount3_state *)rpcsvc_request_program_private (req);
+ ms = (struct mount3_state *)nfs_rpcsvc_request_program_private (req);
if (!ms) {
gf_log (GF_MNT, GF_LOG_ERROR, "Mount state not present");
- rpcsvc_request_seterr (req, SYSTEM_ERR);
+ nfs_rpcsvc_request_seterr (req, SYSTEM_ERR);
ret = -1;
goto rpcerr;
}
- ret = rpcsvc_conn_peername (req->conn, hostname, MNTPATHLEN);
+ ret = nfs_rpcsvc_conn_peername (req->conn, hostname, MNTPATHLEN);
if (ret != 0) {
gf_log (GF_MNT, GF_LOG_ERROR, "Failed to get remote name: %s",
gai_strerror (ret));
@@ -1004,13 +1007,13 @@ mnt3svc_umnt (rpcsvc_request_t *req)
try_umount_with_addr:
if (ret != 0)
- ret = rpcsvc_conn_peeraddr (req->conn, hostname, MNTPATHLEN,
- NULL, 0);
+ ret = nfs_rpcsvc_conn_peeraddr (req->conn, hostname, MNTPATHLEN,
+ NULL, 0);
if (ret != 0) {
gf_log (GF_MNT, GF_LOG_ERROR, "Failed to get remote addr: %s",
gai_strerror (ret));
- rpcsvc_request_seterr (req, SYSTEM_ERR);
+ nfs_rpcsvc_request_seterr (req, SYSTEM_ERR);
goto rpcerr;
}
@@ -1074,10 +1077,10 @@ mnt3svc_umntall (rpcsvc_request_t *req)
if (!req)
return -1;
- ms = (struct mount3_state *)rpcsvc_request_program_private (req);
+ ms = (struct mount3_state *)nfs_rpcsvc_request_program_private (req);
if (!ms) {
gf_log (GF_MNT, GF_LOG_ERROR, "Mount state not present");
- rpcsvc_request_seterr (req, SYSTEM_ERR);
+ nfs_rpcsvc_request_seterr (req, SYSTEM_ERR);
ret = -1;
goto rpcerr;
}
@@ -1124,7 +1127,8 @@ mnt3_xlchildren_to_exports (rpcsvc_t *svc, struct mount3_state *ms)
strcpy (elist->ex_dir, ent->expname);
- addrstr = rpcsvc_volume_allowed (svc->options, ent->vol->name);
+ addrstr = nfs_rpcsvc_volume_allowed (svc->options,
+ ent->vol->name);
if (addrstr)
addrstr = gf_strdup (addrstr);
else
@@ -1171,18 +1175,19 @@ mnt3svc_export (rpcsvc_request_t *req)
if (!req)
return -1;
- ms = (struct mount3_state *)rpcsvc_request_program_private (req);
+ ms = (struct mount3_state *)nfs_rpcsvc_request_program_private (req);
if (!ms) {
gf_log (GF_MNT, GF_LOG_ERROR, "mount state not found");
- rpcsvc_request_seterr (req, SYSTEM_ERR);
+ nfs_rpcsvc_request_seterr (req, SYSTEM_ERR);
goto err;
}
/* Using the children translator names, build the export list */
- elist = mnt3_xlchildren_to_exports (rpcsvc_request_service (req), ms);
+ elist = mnt3_xlchildren_to_exports (nfs_rpcsvc_request_service (req),
+ ms);
if (!elist) {
gf_log (GF_MNT, GF_LOG_ERROR, "Failed to build exports list");
- rpcsvc_request_seterr (req, SYSTEM_ERR);
+ nfs_rpcsvc_request_seterr (req, SYSTEM_ERR);
goto err;
}
diff --git a/xlators/nfs/server/src/nfs.c b/xlators/nfs/server/src/nfs.c
index d7d2a5fd6e2..c74691cceac 100644
--- a/xlators/nfs/server/src/nfs.c
+++ b/xlators/nfs/server/src/nfs.c
@@ -81,7 +81,7 @@ nfs_deinit_versions (struct list_head *versions, xlator_t *this)
version->deinit (this);
*/
if (version->program)
- rpcsvc_program_unregister (nfs->rpcsvc,
+ nfs_rpcsvc_program_unregister (nfs->rpcsvc,
*(version->program));
list_del (&version->list);
@@ -121,7 +121,7 @@ nfs_init_versions (struct nfs_state *nfs, xlator_t *this)
gf_log (GF_NFS, GF_LOG_DEBUG, "Starting program: %s",
prog->progname);
- ret = rpcsvc_program_register (nfs->rpcsvc, *prog);
+ ret = nfs_rpcsvc_program_register (nfs->rpcsvc, *prog);
if (ret == -1) {
gf_log (GF_NFS, GF_LOG_ERROR, "Program init failed");
goto err;
@@ -430,9 +430,9 @@ nfs_request_user_init (nfs_user_t *nfu, rpcsvc_request_t *req)
if ((!req) || (!nfu))
return;
- gidarr = rpcsvc_auth_unix_auxgids (req, &gids);
- nfs_user_create (nfu, rpcsvc_request_uid (req), rpcsvc_request_gid (req)
- , gidarr, gids);
+ gidarr = nfs_rpcsvc_auth_unix_auxgids (req, &gids);
+ nfs_user_create (nfu, nfs_rpcsvc_request_uid (req),
+ nfs_rpcsvc_request_gid (req), gidarr, gids);
return;
}
@@ -479,7 +479,7 @@ init (xlator_t *this) {
}
/* RPC service needs to be started before NFS versions can be inited. */
- nfs->rpcsvc = rpcsvc_init (this->ctx, this->options);
+ nfs->rpcsvc = nfs_rpcsvc_init (this->ctx, this->options);
if (!nfs->rpcsvc) {
gf_log (GF_NFS, GF_LOG_ERROR, "RPC service init failed");
goto free_nfs;
diff --git a/xlators/nfs/server/src/nfs3-helpers.c b/xlators/nfs/server/src/nfs3-helpers.c
index d41bd1815ce..35f5853255e 100644
--- a/xlators/nfs/server/src/nfs3-helpers.c
+++ b/xlators/nfs/server/src/nfs3-helpers.c
@@ -2020,7 +2020,7 @@ nfs3_file_open_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
fd->refcount);
}
- nfs3 = rpcsvc_request_program_private (cs->req);
+ nfs3 = nfs_rpcsvc_request_program_private (cs->req);
nfs3_flush_open_wait_call_states (cs, fd);
nfs3_fdcache_add (nfs3, fd);
return 0;
diff --git a/xlators/nfs/server/src/nfs3.c b/xlators/nfs/server/src/nfs3.c
index 812bb8372a2..7aadcae3efb 100644
--- a/xlators/nfs/server/src/nfs3.c
+++ b/xlators/nfs/server/src/nfs3.c
@@ -57,7 +57,7 @@
#define nfs3_validate_nfs3_state(request, state, status, label, retval) \
do { \
- state = rpcsvc_request_program_private (request); \
+ state = nfs_rpcsvc_request_program_private (request); \
if (!nfs3) { \
gf_log (GF_NFS3, GF_LOG_ERROR, "NFSv3 state " \
"missing from RPC request"); \
@@ -91,7 +91,7 @@
} else { \
gf_log (GF_NFS3, GF_LOG_TRACE, "FH to Volume: %s"\
,volume->name); \
- rpcsvc_request_set_private (req, volume); \
+ nfs_rpcsvc_request_set_private (req, volume); \
} \
} while (0); \
@@ -246,7 +246,7 @@ nfs3_serialize_reply (rpcsvc_request_t *req, void *arg, nfs3_serializer sfunc,
struct iobuf *iob = NULL;
ssize_t retlen = -1;
- nfs3 = (struct nfs3_state *)rpcsvc_request_program_private (req);
+ nfs3 = (struct nfs3_state *)nfs_rpcsvc_request_program_private (req);
if (!nfs3) {
gf_log (GF_NFS3, GF_LOG_ERROR, "NFSv3 state not found in RPC"
" request");
@@ -305,7 +305,7 @@ nfs3svc_submit_reply (rpcsvc_request_t *req, void *arg, nfs3_serializer sfunc)
}
/* Then, submit the message for transmission. */
- ret = rpcsvc_submit_message (req, outmsg, iob);
+ ret = nfs_rpcsvc_submit_message (req, outmsg, iob);
/* Now that we've done our job of handing the message to the RPC layer
* we can safely unref the iob in the hope that RPC layer must have
@@ -341,16 +341,16 @@ nfs3svc_submit_vector_reply (rpcsvc_request_t *req, void *arg,
goto err;
}
- ret = rpcsvc_request_attach_vector (req, outmsg, iob, NULL, 0);
+ ret = nfs_rpcsvc_request_attach_vector (req, outmsg, iob, NULL, 0);
iobuf_unref (iob);
if (piobref)
- ret = rpcsvc_request_attach_vectors (req, payload, vcount,
+ ret = nfs_rpcsvc_request_attach_vectors (req, payload, vcount,
piobref);
if (ret == -1)
goto err;
- ret = rpcsvc_submit_vectors (req);
+ ret = nfs_rpcsvc_submit_vectors (req);
err:
return ret;
@@ -366,8 +366,8 @@ nfs3_request_xlator_id (rpcsvc_request_t *rq)
if (!rq)
return 0;
- xl = rpcsvc_request_private (rq);
- nfs3 = rpcsvc_request_program_private (rq);
+ xl = nfs_rpcsvc_request_private (rq);
+ nfs3 = nfs_rpcsvc_request_program_private (rq);
return nfs_xlator_to_xlid (nfs3->exportslist, xl);
}
@@ -379,7 +379,7 @@ nfs3svc_null (rpcsvc_request_t *req)
if (!req)
return RPCSVC_ACTOR_ERROR;
- rpcsvc_submit_generic (req, dummyvec, NULL);
+ nfs_rpcsvc_submit_generic (req, dummyvec, NULL);
return RPCSVC_ACTOR_SUCCESS;
}
@@ -415,8 +415,8 @@ nfs3svc_getattr_lookup_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
if (op_ret == -1)
status = nfs3_errno_to_nfsstat3 (op_errno);
- nfs3_log_common_res (rpcsvc_request_xid (cs->req), "GETATTR", status,
- op_errno);
+ nfs3_log_common_res (nfs_rpcsvc_request_xid (cs->req), "GETATTR",
+ status, op_errno);
nfs3_getattr_reply (cs->req, status, buf);
nfs3_call_state_wipe (cs);
@@ -439,8 +439,8 @@ nfs3svc_getattr_stat_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
if (op_ret == -1)
status = nfs3_errno_to_nfsstat3 (op_errno);
- nfs3_log_common_res (rpcsvc_request_xid (cs->req), "GETATTR", status,
- op_errno);
+ nfs3_log_common_res (nfs_rpcsvc_request_xid (cs->req), "GETATTR",
+ status, op_errno);
nfs3_getattr_reply (cs->req, status, buf);
nfs3_call_state_wipe (cs);
@@ -484,8 +484,8 @@ nfs3_getattr_resume (void *carg)
nfs3err:
if (ret < 0) {
- nfs3_log_common_res (rpcsvc_request_xid (cs->req), "GETATTR",
- stat, -ret);
+ nfs3_log_common_res (nfs_rpcsvc_request_xid (cs->req),
+ "GETATTR", stat, -ret);
nfs3_getattr_reply (cs->req, stat, NULL);
nfs3_call_state_wipe (cs);
ret = 0;
@@ -507,7 +507,7 @@ nfs3_getattr (rpcsvc_request_t *req, struct nfs3_fh *fh)
if ((!req) || (!fh))
return -1;
- nfs3_log_common_call (rpcsvc_request_xid (req), "GETATTR", fh);
+ nfs3_log_common_call (nfs_rpcsvc_request_xid (req), "GETATTR", fh);
nfs3_validate_gluster_fh (fh, stat, nfs3err);
nfs3_validate_nfs3_state (req, nfs3, stat, nfs3err, ret);
nfs3_map_fh_to_volume (nfs3, fh, req, vol, stat, nfs3err);
@@ -519,8 +519,8 @@ nfs3_getattr (rpcsvc_request_t *req, struct nfs3_fh *fh)
nfs3err:
if (ret < 0) {
- nfs3_log_common_res (rpcsvc_request_xid (req), "GETATTR", stat,
- -ret);
+ nfs3_log_common_res (nfs_rpcsvc_request_xid (req), "GETATTR",
+ stat, -ret);
nfs3_getattr_reply (req, stat, NULL);
ret = 0;
nfs3_call_state_wipe (cstate);
@@ -543,14 +543,14 @@ nfs3svc_getattr (rpcsvc_request_t *req)
nfs3_prep_getattr3args (&args, &fh);
if (xdr_to_getattr3args (req->msg, &args) <= 0) {
gf_log (GF_NFS3, GF_LOG_ERROR, "Error decoding args");
- rpcsvc_request_seterr (req, GARBAGE_ARGS);
+ nfs_rpcsvc_request_seterr (req, GARBAGE_ARGS);
goto rpcerr;
}
ret = nfs3_getattr (req, &fh);
if (ret < 0) {
gf_log (GF_NFS3, GF_LOG_ERROR, "GETATTR procedure failed");
- rpcsvc_request_seterr (req, SYSTEM_ERR);
+ nfs_rpcsvc_request_seterr (req, SYSTEM_ERR);
ret = RPCSVC_ACTOR_ERROR;
}
@@ -600,7 +600,7 @@ nfs3svc_truncate_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
stat = NFS3_OK;
nfs3err:
- nfs3_log_common_res (rpcsvc_request_xid (cs->req), "SETATTR", stat,
+ nfs3_log_common_res (nfs_rpcsvc_request_xid (cs->req), "SETATTR", stat,
op_errno);
nfs3_setattr_reply (cs->req, stat, prestat, postbuf);
nfs3_call_state_wipe (cs);
@@ -658,8 +658,8 @@ nfs3svc_setattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
nfs3err:
if (ret < 0) {
- nfs3_log_common_res (rpcsvc_request_xid (cs->req), "SETATTR",
- stat, op_errno);
+ nfs3_log_common_res (nfs_rpcsvc_request_xid (cs->req),
+ "SETATTR", stat, op_errno);
nfs3_setattr_reply (cs->req, stat, prebuf, postop);
nfs3_call_state_wipe (cs);
}
@@ -701,8 +701,8 @@ nfs3svc_setattr_stat_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
nfs3err:
if (ret < 0) {
- nfs3_log_common_res (rpcsvc_request_xid (cs->req), "SETATTR",
- stat, op_errno);
+ nfs3_log_common_res (nfs_rpcsvc_request_xid (cs->req),
+ "SETATTR", stat, op_errno);
nfs3_setattr_reply (cs->req, stat, NULL, NULL);
nfs3_call_state_wipe (cs);
}
@@ -739,8 +739,8 @@ nfs3_setattr_resume (void *carg)
nfs3err:
if (ret < 0) {
- nfs3_log_common_res (rpcsvc_request_xid (cs->req), "SETATTR",
- stat, -ret);
+ nfs3_log_common_res (nfs_rpcsvc_request_xid (cs->req),
+ "SETATTR", stat, -ret);
nfs3_setattr_reply (cs->req, stat, NULL, NULL);
nfs3_call_state_wipe (cs);
}
@@ -764,7 +764,7 @@ nfs3_setattr (rpcsvc_request_t *req, struct nfs3_fh *fh, sattr3 *sattr,
return -1;
}
- nfs3_log_common_call (rpcsvc_request_xid (req), "SETATTR", fh);
+ nfs3_log_common_call (nfs_rpcsvc_request_xid (req), "SETATTR", fh);
nfs3_validate_gluster_fh (fh, stat, nfs3err);
nfs3_validate_nfs3_state (req, nfs3, stat, nfs3err, ret);
nfs3_map_fh_to_volume (nfs3, fh, req, vol, stat, nfs3err);
@@ -794,8 +794,8 @@ nfs3_setattr (rpcsvc_request_t *req, struct nfs3_fh *fh, sattr3 *sattr,
nfs3err:
if (ret < 0) {
- nfs3_log_common_res (rpcsvc_request_xid (req), "SETATTR", stat,
- -ret);
+ nfs3_log_common_res (nfs_rpcsvc_request_xid (req), "SETATTR",
+ stat, -ret);
nfs3_setattr_reply (req, stat, NULL, NULL);
nfs3_call_state_wipe (cs);
/* Ret must be 0 after this so that the caller does not
@@ -822,14 +822,14 @@ nfs3svc_setattr (rpcsvc_request_t *req)
nfs3_prep_setattr3args (&args, &fh);
if (xdr_to_setattr3args (req->msg, &args) <= 0) {
gf_log (GF_NFS3, GF_LOG_ERROR, "Error decoding args");
- rpcsvc_request_seterr (req, GARBAGE_ARGS);
+ nfs_rpcsvc_request_seterr (req, GARBAGE_ARGS);
goto rpcerr;
}
ret = nfs3_setattr (req, &fh, &args.new_attributes, &args.guard);
if (ret < 0) {
gf_log (GF_NFS3, GF_LOG_ERROR, "SETATTR procedure failed");
- rpcsvc_request_seterr (req, SYSTEM_ERR);
+ nfs_rpcsvc_request_seterr (req, SYSTEM_ERR);
ret = RPCSVC_ACTOR_ERROR;
}
@@ -869,7 +869,7 @@ nfs3svc_lookup_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
nfs3_fh_build_child_fh (&cs->parent, buf, &newfh);
xmit_res:
- nfs3_log_newfh_res (rpcsvc_request_xid (cs->req), "LOOKUP", status,
+ nfs3_log_newfh_res (nfs_rpcsvc_request_xid (cs->req), "LOOKUP", status,
op_errno, &newfh);
nfs3_lookup_reply (cs->req, status, &newfh, buf, postparent);
nfs3_call_state_wipe (cs);
@@ -905,7 +905,7 @@ nfs3svc_lookup_parentdir_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
cs->vol);
xmit_res:
- nfs3_log_newfh_res (rpcsvc_request_xid (cs->req), "LOOKUP", status,
+ nfs3_log_newfh_res (nfs_rpcsvc_request_xid (cs->req), "LOOKUP", status,
op_errno, &newfh);
nfs3_lookup_reply (cs->req, status, &newfh, buf, postparent);
nfs3_call_state_wipe (cs);
@@ -970,7 +970,7 @@ errtostat:
nfs3err:
if (ret < 0) {
- nfs3_log_common_res (rpcsvc_request_xid (cs->req), "LOOKUP",
+ nfs3_log_common_res (nfs_rpcsvc_request_xid (cs->req), "LOOKUP",
stat, -ret);
nfs3_lookup_reply (cs->req, stat, NULL, NULL, NULL);
nfs3_call_state_wipe (cs);
@@ -1005,7 +1005,7 @@ nfs3_lookup_resume (void *carg)
nfs3err:
if (ret < 0) {
- nfs3_log_common_res (rpcsvc_request_xid (cs->req), "LOOKUP",
+ nfs3_log_common_res (nfs_rpcsvc_request_xid (cs->req), "LOOKUP",
stat, -ret);
nfs3_lookup_reply (cs->req, stat, NULL, NULL, NULL);
nfs3_call_state_wipe (cs);
@@ -1029,7 +1029,8 @@ nfs3_lookup (rpcsvc_request_t *req, struct nfs3_fh *fh, int fhlen, char *name)
return -1;
}
- nfs3_log_fh_entry_call (rpcsvc_request_xid (req), "LOOKUP", fh, name);
+ nfs3_log_fh_entry_call (nfs_rpcsvc_request_xid (req), "LOOKUP", fh,
+ name);
nfs3_validate_nfs3_state (req, nfs3, stat, nfs3err, ret);
if (nfs3_solaris_zerolen_fh (fh, fhlen))
nfs3_funge_solaris_zerolen_fh (nfs3, fh, name, stat, nfs3err);
@@ -1051,7 +1052,8 @@ nfs3_lookup (rpcsvc_request_t *req, struct nfs3_fh *fh, int fhlen, char *name)
nfs3err:
if (ret < 0) {
- nfs3_log_common_res (rpcsvc_request_xid (req), "LOOKUP", stat,
+ nfs3_log_common_res (nfs_rpcsvc_request_xid (req), "LOOKUP",
+ stat,
-ret);
nfs3_lookup_reply (req, stat, NULL, NULL, NULL);
nfs3_call_state_wipe (cs);
@@ -1079,14 +1081,14 @@ nfs3svc_lookup (rpcsvc_request_t *req)
nfs3_prep_lookup3args (&args, &fh, name);
if (xdr_to_lookup3args (req->msg, &args) <= 0) {
gf_log (GF_NFS3, GF_LOG_ERROR, "Error decoding args");
- rpcsvc_request_seterr (req, GARBAGE_ARGS);
+ nfs_rpcsvc_request_seterr (req, GARBAGE_ARGS);
goto rpcerr;
}
ret = nfs3_lookup (req, &fh, args.what.dir.data.data_len, name);
if (ret < 0) {
gf_log (GF_NFS3, GF_LOG_ERROR, "LOOKUP procedure failed");
- rpcsvc_request_seterr (req, SYSTEM_ERR);
+ nfs_rpcsvc_request_seterr (req, SYSTEM_ERR);
ret = RPCSVC_ACTOR_ERROR;
}
@@ -1104,7 +1106,8 @@ nfs3_access_reply (rpcsvc_request_t *req, nfsstat3 status, struct iatt *buf,
xlid = nfs3_request_xlator_id (req);
nfs3_fill_access3res (&res, status, buf, accbits,
- rpcsvc_request_uid (req), rpcsvc_request_gid (req)
+ nfs_rpcsvc_request_uid (req),
+ nfs_rpcsvc_request_gid (req)
, xlid);
nfs3svc_submit_reply (req, &res,
(nfs3_serializer)xdr_serialize_access3res);
@@ -1124,7 +1127,7 @@ nfs3svc_access_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
if (op_ret == -1)
status = nfs3_errno_to_nfsstat3 (op_errno);
- nfs3_log_common_res (rpcsvc_request_xid (cs->req), "ACCESS", status,
+ nfs3_log_common_res (nfs_rpcsvc_request_xid (cs->req), "ACCESS", status,
op_errno);
nfs3_access_reply (cs->req, status, buf, cs->accessbits);
nfs3_call_state_wipe (cs);
@@ -1154,7 +1157,7 @@ nfs3_access_resume (void *carg)
nfs3err:
if (ret < 0) {
- nfs3_log_common_res (rpcsvc_request_xid (cs->req), "ACCESS",
+ nfs3_log_common_res (nfs_rpcsvc_request_xid (cs->req), "ACCESS",
stat, -ret);
nfs3_access_reply (cs->req, stat, NULL, 0);
nfs3_call_state_wipe (cs);
@@ -1177,7 +1180,7 @@ nfs3_access (rpcsvc_request_t *req, struct nfs3_fh *fh, uint32_t accbits)
if ((!req) || (!fh))
return -1;
- nfs3_log_common_call (rpcsvc_request_xid (req), "ACCESS", fh);
+ nfs3_log_common_call (nfs_rpcsvc_request_xid (req), "ACCESS", fh);
nfs3_validate_gluster_fh (fh, stat, nfs3err);
nfs3_validate_nfs3_state (req, nfs3, stat, nfs3err, ret);
nfs3_map_fh_to_volume (nfs3, fh, req, vol, stat, nfs3err);
@@ -1190,8 +1193,8 @@ nfs3_access (rpcsvc_request_t *req, struct nfs3_fh *fh, uint32_t accbits)
nfs3err:
if (ret < 0) {
- nfs3_log_common_res (rpcsvc_request_xid (req), "ACCESS", stat,
- -ret);
+ nfs3_log_common_res (nfs_rpcsvc_request_xid (req), "ACCESS",
+ stat, -ret);
nfs3_access_reply (req, stat, NULL, 0);
nfs3_call_state_wipe (cs);
ret = 0;
@@ -1214,14 +1217,14 @@ nfs3svc_access (rpcsvc_request_t *req)
nfs3_prep_access3args (&args, &fh);
if (xdr_to_access3args (req->msg, &args) <= 0) {
gf_log (GF_NFS3, GF_LOG_ERROR, "Error decoding args");
- rpcsvc_request_seterr (req, GARBAGE_ARGS);
+ nfs_rpcsvc_request_seterr (req, GARBAGE_ARGS);
goto rpcerr;
}
ret = nfs3_access (req, &fh, args.access);
if (ret < 0) {
gf_log (GF_NFS3, GF_LOG_ERROR, "ACCESS procedure failed");
- rpcsvc_request_seterr (req, SYSTEM_ERR);
+ nfs_rpcsvc_request_seterr (req, SYSTEM_ERR);
ret = RPCSVC_ACTOR_ERROR;
}
@@ -1263,7 +1266,7 @@ nfs3svc_readlink_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
stat = NFS3_OK;
nfs3err:
- nfs3_log_readlink_res (rpcsvc_request_xid (cs->req), stat, op_errno,
+ nfs3_log_readlink_res (nfs_rpcsvc_request_xid (cs->req), stat, op_errno,
(char *)path);
nfs3_readlink_reply (cs->req, stat, (char *)path, buf);
nfs3_call_state_wipe (cs);
@@ -1293,8 +1296,8 @@ nfs3_readlink_resume (void *carg)
nfs3err:
if (ret < 0) {
- nfs3_log_common_res (rpcsvc_request_xid (cs->req), "READLINK",
- stat, -ret);
+ nfs3_log_common_res (nfs_rpcsvc_request_xid (cs->req),
+ "READLINK", stat, -ret);
nfs3_readlink_reply (cs->req, stat, NULL, NULL);
nfs3_call_state_wipe (cs);
}
@@ -1317,7 +1320,7 @@ nfs3_readlink (rpcsvc_request_t *req, struct nfs3_fh *fh)
return -1;
}
- nfs3_log_common_call (rpcsvc_request_xid (req), "READLINK", fh);
+ nfs3_log_common_call (nfs_rpcsvc_request_xid (req), "READLINK", fh);
nfs3_validate_gluster_fh (fh, stat, nfs3err);
nfs3_validate_nfs3_state (req, nfs3, stat, nfs3err, ret);
nfs3_map_fh_to_volume (nfs3, fh, req, vol, stat, nfs3err);
@@ -1329,8 +1332,8 @@ nfs3_readlink (rpcsvc_request_t *req, struct nfs3_fh *fh)
nfs3err:
if (ret < 0) {
- nfs3_log_common_res (rpcsvc_request_xid (req), "READLINK", stat,
- -ret);
+ nfs3_log_common_res (nfs_rpcsvc_request_xid (req), "READLINK",
+ stat, -ret);
nfs3_readlink_reply (req, stat, NULL, NULL);
nfs3_call_state_wipe (cs);
/* Ret must be 0 after this so that the caller does not
@@ -1356,14 +1359,14 @@ nfs3svc_readlink (rpcsvc_request_t *req)
nfs3_prep_readlink3args (&args, &fh);
if (xdr_to_readlink3args (req->msg, &args) <= 0) {
gf_log (GF_NFS3, GF_LOG_ERROR, "Error decoding args");
- rpcsvc_request_seterr (req, GARBAGE_ARGS);
+ nfs_rpcsvc_request_seterr (req, GARBAGE_ARGS);
goto rpcerr;
}
ret = nfs3_readlink (req, &fh);
if (ret < 0) {
gf_log (GF_NFS3, GF_LOG_ERROR, "READLINK procedure failed");
- rpcsvc_request_seterr (req, SYSTEM_ERR);
+ nfs_rpcsvc_request_seterr (req, SYSTEM_ERR);
ret = RPCSVC_ACTOR_ERROR;
}
@@ -1383,7 +1386,7 @@ nfs3_read_reply (rpcsvc_request_t *req, nfsstat3 stat, count3 count,
xlid = nfs3_request_xlator_id (req);
nfs3_fill_read3res (&res, stat, count, poststat, is_eof, xlid);
if (stat == NFS3_OK) {
- xdr_vector_round_up (vec, vcount, count);
+ nfs_xdr_vector_round_up (vec, vcount, count);
/* iob can be zero if the file size was zero. If so, op_ret
* would be 0 and count = 0.
*/
@@ -1425,7 +1428,7 @@ nfs3svc_read_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
is_eof = 1;
err:
- nfs3_log_read_res (rpcsvc_request_xid (cs->req), stat, op_errno,
+ nfs3_log_read_res (nfs_rpcsvc_request_xid (cs->req), stat, op_errno,
op_ret, is_eof, vector, count);
nfs3_read_reply (cs->req, stat, op_ret, vector, count, iobref, stbuf,
is_eof);
@@ -1455,8 +1458,8 @@ nfs3_read_fd_resume (void *carg)
stat = nfs3_errno_to_nfsstat3 (-ret);
nfs3err:
if (ret < 0) {
- nfs3_log_common_res (rpcsvc_request_xid (cs->req), "READ", stat,
- -ret);
+ nfs3_log_common_res (nfs_rpcsvc_request_xid (cs->req), "READ",
+ stat, -ret);
nfs3_read_reply (cs->req, stat, 0, NULL, 0, NULL, NULL, 0);
nfs3_call_state_wipe (cs);
}
@@ -1483,8 +1486,8 @@ nfs3_read_resume (void *carg)
nfs3err:
if (ret < 0) {
- nfs3_log_common_res (rpcsvc_request_xid (cs->req), "READ", stat,
- -ret);
+ nfs3_log_common_res (nfs_rpcsvc_request_xid (cs->req), "READ",
+ stat, -ret);
nfs3_read_reply (cs->req, stat, 0, NULL,0, NULL, NULL, 0);
nfs3_call_state_wipe (cs);
}
@@ -1507,8 +1510,8 @@ nfs3_read (rpcsvc_request_t *req, struct nfs3_fh *fh, offset3 offset,
return -1;
}
- nfs3_log_rw_call (rpcsvc_request_xid (req), "READ", fh, offset, count,
- -1);
+ nfs3_log_rw_call (nfs_rpcsvc_request_xid (req), "READ", fh, offset,
+ count, -1);
nfs3_validate_gluster_fh (fh, stat, nfs3err);
nfs3_validate_nfs3_state (req, nfs3, stat, nfs3err, ret);
nfs3_map_fh_to_volume (nfs3, fh, req, vol, stat, nfs3err);
@@ -1522,7 +1525,7 @@ nfs3_read (rpcsvc_request_t *req, struct nfs3_fh *fh, offset3 offset,
nfs3err:
if (ret < 0) {
- nfs3_log_common_res (rpcsvc_request_xid (req), "READ", stat,
+ nfs3_log_common_res (nfs_rpcsvc_request_xid (req), "READ", stat,
-ret);
nfs3_read_reply (req, stat, 0, NULL,0, NULL, NULL, 0);
nfs3_call_state_wipe (cs);
@@ -1546,14 +1549,14 @@ nfs3svc_read (rpcsvc_request_t *req)
nfs3_prep_read3args (&args, &fh);
if (xdr_to_read3args (req->msg, &args) <= 0) {
gf_log (GF_NFS3, GF_LOG_ERROR, "Error decoding args");
- rpcsvc_request_seterr (req, GARBAGE_ARGS);
+ nfs_rpcsvc_request_seterr (req, GARBAGE_ARGS);
goto rpcerr;
}
ret = nfs3_read (req, &fh, args.offset, args.count);
if (ret < 0) {
gf_log (GF_NFS3, GF_LOG_ERROR, "READ procedure failed");
- rpcsvc_request_seterr (req, SYSTEM_ERR);
+ nfs_rpcsvc_request_seterr (req, SYSTEM_ERR);
ret = RPCSVC_ACTOR_ERROR;
}
@@ -1589,14 +1592,14 @@ nfs3svc_write_fsync_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
nfs3_call_state_t *cs = NULL;
cs = frame->local;
- nfs3 = rpcsvc_request_program_private (cs->req);
+ nfs3 = nfs_rpcsvc_request_program_private (cs->req);
if (op_ret == -1)
stat = nfs3_errno_to_nfsstat3 (op_errno);
else
stat = NFS3_OK;
- nfs3_log_write_res (rpcsvc_request_xid (cs->req), stat, op_errno,
+ nfs3_log_write_res (nfs_rpcsvc_request_xid (cs->req), stat, op_errno,
cs->maxcount, cs->writetype, nfs3->serverstart);
nfs3_write_reply (cs->req, stat, cs->maxcount, cs->writetype,
nfs3->serverstart, &cs->stbuf, postbuf);
@@ -1686,7 +1689,7 @@ nfs3svc_write_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int sync_trusted = 0;
cs = frame->local;
- nfs3 = rpcsvc_request_program_private (cs->req);
+ nfs3 = nfs_rpcsvc_request_program_private (cs->req);
if (op_ret == -1) {
stat = nfs3_errno_to_nfsstat3 (op_errno);
goto err;
@@ -1716,7 +1719,7 @@ nfs3svc_write_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
err:
if (ret < 0) {
- nfs3_log_write_res (rpcsvc_request_xid (cs->req), stat,
+ nfs3_log_write_res (nfs_rpcsvc_request_xid (cs->req), stat,
op_errno, cs->maxcount, cs->writetype,
nfs3->serverstart);
nfs3_write_reply (cs->req, stat, cs->maxcount,
@@ -1776,7 +1779,7 @@ nfs3_write_resume (void *carg)
stat = nfs3_errno_to_nfsstat3 (-ret);
nfs3err:
if (ret < 0) {
- nfs3_log_common_res (rpcsvc_request_xid (cs->req), "WRITE",
+ nfs3_log_common_res (nfs_rpcsvc_request_xid (cs->req), "WRITE",
stat, -ret);
nfs3_write_reply (cs->req, stat, 0, cs->writetype, 0, NULL,
NULL);
@@ -1803,7 +1806,7 @@ nfs3_write_open_resume (void *carg)
stat = nfs3_errno_to_nfsstat3 (-ret);
nfs3err:
if (ret < 0) {
- nfs3_log_common_res (rpcsvc_request_xid (cs->req), "WRITE",
+ nfs3_log_common_res (nfs_rpcsvc_request_xid (cs->req), "WRITE",
stat, -ret);
nfs3_write_reply (cs->req, stat, 0, cs->writetype, 0, NULL,
NULL);
@@ -1830,8 +1833,8 @@ nfs3_write (rpcsvc_request_t *req, struct nfs3_fh *fh, offset3 offset,
return -1;
}
- nfs3_log_rw_call (rpcsvc_request_xid (req), "WRITE", fh, offset, count,
- stable);
+ nfs3_log_rw_call (nfs_rpcsvc_request_xid (req), "WRITE", fh, offset,
+ count, stable);
nfs3_validate_gluster_fh (fh, stat, nfs3err);
nfs3_validate_nfs3_state (req, nfs3, stat, nfs3err, ret);
nfs3_map_fh_to_volume (nfs3, fh, req, vol, stat, nfs3err);
@@ -1850,8 +1853,8 @@ nfs3_write (rpcsvc_request_t *req, struct nfs3_fh *fh, offset3 offset,
nfs3err:
if (ret < 0) {
- nfs3_log_common_res (rpcsvc_request_xid (req), "WRITE", stat,
- -ret);
+ nfs3_log_common_res (nfs_rpcsvc_request_xid (req), "WRITE",
+ stat, -ret);
nfs3_write_reply (req, stat, 0, stable, 0, NULL, NULL);
nfs3_call_state_wipe (cs);
ret = 0;
@@ -1879,21 +1882,21 @@ nfs3svc_write_vecsizer (rpcsvc_request_t *req, ssize_t *readsize, int *newbuf)
if (!req)
return ret;
- state = (long)rpcsvc_request_private (req);
+ state = (long)nfs_rpcsvc_request_private (req);
*newbuf = 0;
if (state == 0) {
- rpcsvc_request_set_private (req, NFS3_VECWRITE_READFHLEN);
+ nfs_rpcsvc_request_set_private (req, NFS3_VECWRITE_READFHLEN);
*readsize = 4;
ret = 0;
} else if (state == NFS3_VECWRITE_READFHLEN) {
fhlen_n = *(uint32_t *)req->msg.iov_base;
fhlen = ntohl (fhlen_n);
- *readsize = xdr_length_round_up (fhlen, NFS3_FHSIZE);
- rpcsvc_request_set_private (req, NFS3_VECWRITE_READFH);
+ *readsize = nfs_xdr_length_round_up (fhlen, NFS3_FHSIZE);
+ nfs_rpcsvc_request_set_private (req, NFS3_VECWRITE_READFH);
ret = 0;
} else if (state == NFS3_VECWRITE_READFH) {
*readsize = NFS3_WRITE_POSTFH_SIZE;
- rpcsvc_request_set_private (req, NFS3_VECWRITE_READREST);
+ nfs_rpcsvc_request_set_private (req, NFS3_VECWRITE_READREST);
ret = 0;
} else if (state == NFS3_VECWRITE_READREST) {
args = GF_CALLOC (1, sizeof (*args), gf_nfs_mt_write3args);
@@ -1902,11 +1905,11 @@ nfs3svc_write_vecsizer (rpcsvc_request_t *req, ssize_t *readsize, int *newbuf)
if (xdr_to_write3args_nocopy (req->msg, args, NULL) <= 0) {
gf_log (GF_NFS3, GF_LOG_ERROR, "Error decoding args");
- rpcsvc_request_seterr (req, GARBAGE_ARGS);
+ nfs_rpcsvc_request_seterr (req, GARBAGE_ARGS);
goto rpcerr;
}
- rpcsvc_request_set_private (req, args);
- ret = xdr_length_round_up (args->data.data_len, 1048576);
+ nfs_rpcsvc_request_set_private (req, args);
+ ret = nfs_xdr_length_round_up (args->data.data_len, 1048576);
*readsize = ret;
*newbuf = 1;
ret = 0;
@@ -1928,7 +1931,7 @@ nfs3svc_write_vec (rpcsvc_request_t *req, struct iobuf *iob)
if ((!req) || (!iob))
return ret;
- args = rpcsvc_request_private (req);
+ args = nfs_rpcsvc_request_private (req);
iobuf_to_iovec (iob, &payload);
iobuf_ref (iob);
ret = nfs3_write (req, (struct nfs3_fh *)args->file.data.data_val,
@@ -1936,7 +1939,7 @@ nfs3svc_write_vec (rpcsvc_request_t *req, struct iobuf *iob)
xdr_free_write3args_nocopy (args);
if (ret < 0) {
gf_log (GF_NFS3, GF_LOG_ERROR, "WRITE procedure failed");
- rpcsvc_request_seterr (req, SYSTEM_ERR);
+ nfs_rpcsvc_request_seterr (req, SYSTEM_ERR);
ret = RPCSVC_ACTOR_ERROR;
}
@@ -1958,7 +1961,7 @@ nfs3svc_write (rpcsvc_request_t *req)
nfs3_prep_write3args (&args, &fh);
if (xdr_to_write3args_nocopy (req->msg, &args, &payload) <= 0) {
gf_log (GF_NFS3, GF_LOG_ERROR, "Error decoding args");
- rpcsvc_request_seterr (req, GARBAGE_ARGS);
+ nfs_rpcsvc_request_seterr (req, GARBAGE_ARGS);
goto rpcerr;
}
@@ -1967,12 +1970,12 @@ nfs3svc_write (rpcsvc_request_t *req)
* ourselves because the RPC call handler who called us will unref its
* own ref of the record's iobuf when it is done handling the request.
*/
- rpcsvc_request_record_ref (req);
+ nfs_rpcsvc_request_record_ref (req);
ret = nfs3_write (req, &fh, args.offset, args.count, args.stable,
- payload, rpcsvc_request_record_iob (req));
+ payload, nfs_rpcsvc_request_record_iob (req));
if (ret < 0) {
gf_log (GF_NFS3, GF_LOG_ERROR, "WRITE procedure failed");
- rpcsvc_request_seterr (req, SYSTEM_ERR);
+ nfs_rpcsvc_request_seterr (req, SYSTEM_ERR);
ret = RPCSVC_ACTOR_ERROR;
}
@@ -2011,7 +2014,7 @@ nfs3svc_create_setattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
stat = NFS3_OK;
nfs3err:
- nfs3_log_newfh_res (rpcsvc_request_xid (cs->req), "CREATE", stat,
+ nfs3_log_newfh_res (nfs_rpcsvc_request_xid (cs->req), "CREATE", stat,
op_errno, &cs->fh);
nfs3_create_reply (cs->req, stat, &cs->fh, postop, &cs->preparent,
&cs->postparent);
@@ -2057,7 +2060,7 @@ nfs3svc_create_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
nfs3err:
if (ret < 0) {
- nfs3_log_newfh_res (rpcsvc_request_xid (cs->req), "CREATE",
+ nfs3_log_newfh_res (nfs_rpcsvc_request_xid (cs->req), "CREATE",
stat, op_errno, &cs->fh);
nfs3_create_reply (cs->req, stat, &cs->fh, buf, preparent,
postparent);
@@ -2124,7 +2127,7 @@ nfs3svc_create_stat_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
nfs3err:
if (ret < 0) {
- nfs3_log_common_res (rpcsvc_request_xid (cs->req), "CREATE",
+ nfs3_log_common_res (nfs_rpcsvc_request_xid (cs->req), "CREATE",
stat, op_errno);
nfs3_create_reply (cs->req, stat, NULL, NULL, NULL, NULL);
nfs3_call_state_wipe (cs);
@@ -2196,7 +2199,7 @@ nfs3_create_resume (void *carg)
nfs3err:
if (ret < 0) {
- nfs3_log_common_res (rpcsvc_request_xid (cs->req), "CREATE",
+ nfs3_log_common_res (nfs_rpcsvc_request_xid (cs->req), "CREATE",
stat, -ret);
nfs3_create_reply (cs->req, stat, NULL, NULL, NULL, NULL);
nfs3_call_state_wipe (cs);
@@ -2218,7 +2221,7 @@ nfs3_create (rpcsvc_request_t *req, struct nfs3_fh *dirfh, char *name,
if ((!req) || (!dirfh) || (!name) || (!sattr))
return -1;
- nfs3_log_create_call (rpcsvc_request_xid (req), dirfh, name, mode);
+ nfs3_log_create_call (nfs_rpcsvc_request_xid (req), dirfh, name, mode);
nfs3_validate_gluster_fh (dirfh, stat, nfs3err);
nfs3_validate_nfs3_state (req, nfs3, stat, nfs3err, ret);
nfs3_validate_strlen_or_goto (name, NFS_NAME_MAX, nfs3err, stat, ret);
@@ -2238,8 +2241,8 @@ nfs3_create (rpcsvc_request_t *req, struct nfs3_fh *dirfh, char *name,
nfs3err:
if (ret < 0) {
- nfs3_log_common_res (rpcsvc_request_xid (req), "CREATE", stat,
- -ret);
+ nfs3_log_common_res (nfs_rpcsvc_request_xid (req), "CREATE",
+ stat, -ret);
nfs3_create_reply (req, stat, NULL, NULL, NULL, NULL);
nfs3_call_state_wipe (cs);
ret = 0;
@@ -2264,7 +2267,7 @@ nfs3svc_create (rpcsvc_request_t *req)
nfs3_prep_create3args (&args, &dirfh, name);
if (xdr_to_create3args (req->msg, &args) <= 0) {
gf_log (GF_NFS3, GF_LOG_ERROR, "Error decoding args");
- rpcsvc_request_seterr (req, GARBAGE_ARGS);
+ nfs_rpcsvc_request_seterr (req, GARBAGE_ARGS);
goto rpcerr;
}
@@ -2273,7 +2276,7 @@ nfs3svc_create (rpcsvc_request_t *req)
&args.how.createhow3_u.obj_attributes, cverf);
if (ret < 0) {
gf_log (GF_NFS3, GF_LOG_ERROR, "CREATE procedure failed");
- rpcsvc_request_seterr (req, SYSTEM_ERR);
+ nfs_rpcsvc_request_seterr (req, SYSTEM_ERR);
ret = RPCSVC_ACTOR_ERROR;
}
@@ -2311,7 +2314,7 @@ nfs3svc_mkdir_setattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
stat = NFS3_OK;
nfs3err:
- nfs3_log_newfh_res (rpcsvc_request_xid (cs->req), "MKDIR", stat,
+ nfs3_log_newfh_res (nfs_rpcsvc_request_xid (cs->req), "MKDIR", stat,
op_errno, &cs->fh);
nfs3_mkdir_reply (cs->req, stat, &cs->fh, postop, &cs->preparent,
&cs->postparent);
@@ -2356,8 +2359,8 @@ nfs3svc_mkdir_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
nfs3err:
if (ret < 0) {
- nfs3_log_newfh_res (rpcsvc_request_xid (cs->req), "MKDIR", stat,
- op_errno, &cs->fh);
+ nfs3_log_newfh_res (nfs_rpcsvc_request_xid (cs->req), "MKDIR",
+ stat, op_errno, &cs->fh);
nfs3_mkdir_reply (cs->req, stat, &cs->fh, buf, preparent,
postparent);
nfs3_call_state_wipe (cs);
@@ -2395,8 +2398,8 @@ nfs3_mkdir_resume (void *carg)
nfs3err:
if (ret < 0) {
- nfs3_log_common_res (rpcsvc_request_xid (cs->req), "MKDIR",stat,
- -ret);
+ nfs3_log_common_res (nfs_rpcsvc_request_xid (cs->req), "MKDIR",
+ stat, -ret);
nfs3_mkdir_reply (cs->req, stat, NULL, NULL, NULL, NULL);
nfs3_call_state_wipe (cs);
}
@@ -2421,7 +2424,8 @@ nfs3_mkdir (rpcsvc_request_t *req, struct nfs3_fh *dirfh, char *name,
return -1;
}
- nfs3_log_fh_entry_call (rpcsvc_request_xid (req), "MKDIR", dirfh, name);
+ nfs3_log_fh_entry_call (nfs_rpcsvc_request_xid (req), "MKDIR", dirfh,
+ name);
nfs3_validate_gluster_fh (dirfh, stat, nfs3err);
nfs3_validate_nfs3_state (req, nfs3, stat, nfs3err, ret);
nfs3_validate_strlen_or_goto (name, NFS_NAME_MAX, nfs3err, stat, ret);
@@ -2438,8 +2442,8 @@ nfs3_mkdir (rpcsvc_request_t *req, struct nfs3_fh *dirfh, char *name,
nfs3err:
if (ret < 0) {
- nfs3_log_common_res (rpcsvc_request_xid (req), "MKDIR", stat,
- -ret);
+ nfs3_log_common_res (nfs_rpcsvc_request_xid (req), "MKDIR",
+ stat, -ret);
nfs3_mkdir_reply (req, stat, NULL, NULL, NULL, NULL);
nfs3_call_state_wipe (cs);
ret = 0;
@@ -2462,14 +2466,14 @@ nfs3svc_mkdir (rpcsvc_request_t *req)
nfs3_prep_mkdir3args (&args, &dirfh, name);
if (xdr_to_mkdir3args (req->msg, &args) <= 0) {
gf_log (GF_NFS3, GF_LOG_ERROR, "Error decoding args");
- rpcsvc_request_seterr (req, GARBAGE_ARGS);
+ nfs_rpcsvc_request_seterr (req, GARBAGE_ARGS);
goto rpcerr;
}
ret = nfs3_mkdir (req, &dirfh, name, &args.attributes);
if (ret < 0) {
gf_log (GF_NFS3, GF_LOG_ERROR, "MKDIR procedure failed");
- rpcsvc_request_seterr (req, SYSTEM_ERR);
+ nfs_rpcsvc_request_seterr (req, SYSTEM_ERR);
ret = RPCSVC_ACTOR_ERROR;
}
@@ -2512,7 +2516,7 @@ nfs3svc_symlink_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
stat = NFS3_OK;
nfs3err:
- nfs3_log_newfh_res (rpcsvc_request_xid (cs->req), "SYMLINK", stat,
+ nfs3_log_newfh_res (nfs_rpcsvc_request_xid (cs->req), "SYMLINK", stat,
op_errno, &cs->fh);
nfs3_symlink_reply (cs->req, stat, &cs->fh, buf, preparent,
postparent);
@@ -2542,8 +2546,8 @@ nfs3_symlink_resume (void *carg)
nfs3err:
if (ret < 0) {
- nfs3_log_common_res (rpcsvc_request_xid (cs->req), "SYMLINK",
- stat, -ret);
+ nfs3_log_common_res (nfs_rpcsvc_request_xid (cs->req),
+ "SYMLINK", stat, -ret);
nfs3_symlink_reply (cs->req, stat, NULL, NULL, NULL, NULL);
nfs3_call_state_wipe (cs);
}
@@ -2567,7 +2571,8 @@ nfs3_symlink (rpcsvc_request_t *req, struct nfs3_fh *dirfh, char *name,
return -1;
}
- nfs3_log_symlink_call (rpcsvc_request_xid (req), dirfh, name, target);
+ nfs3_log_symlink_call (nfs_rpcsvc_request_xid (req), dirfh, name,
+ target);
nfs3_validate_gluster_fh (dirfh, stat, nfs3err);
nfs3_validate_nfs3_state (req, nfs3, stat, nfs3err, ret);
nfs3_validate_strlen_or_goto (name, NFS_NAME_MAX, nfs3err, stat, ret);
@@ -2589,8 +2594,8 @@ nfs3_symlink (rpcsvc_request_t *req, struct nfs3_fh *dirfh, char *name,
nfs3err:
if (ret < 0) {
- nfs3_log_common_res (rpcsvc_request_xid (req), "SYMLINK", stat,
- -ret);
+ nfs3_log_common_res (nfs_rpcsvc_request_xid (req), "SYMLINK",
+ stat, -ret);
nfs3_symlink_reply (req, stat, NULL, NULL, NULL, NULL);
nfs3_call_state_wipe (cs);
/* Ret must be 0 after this so that the caller does not
@@ -2617,7 +2622,7 @@ nfs3svc_symlink (rpcsvc_request_t *req)
nfs3_prep_symlink3args (&args, &dirfh, name, target);
if (xdr_to_symlink3args (req->msg, &args) <= 0) {
gf_log (GF_NFS3, GF_LOG_ERROR, "Error decoding args");
- rpcsvc_request_seterr (req, GARBAGE_ARGS);
+ nfs_rpcsvc_request_seterr (req, GARBAGE_ARGS);
goto rpcerr;
}
@@ -2625,7 +2630,7 @@ nfs3svc_symlink (rpcsvc_request_t *req)
&args.symlink.symlink_attributes);
if (ret < 0) {
gf_log (GF_NFS3, GF_LOG_ERROR, "SYMLINK procedure failed");
- rpcsvc_request_seterr (req, SYSTEM_ERR);
+ nfs_rpcsvc_request_seterr (req, SYSTEM_ERR);
ret = RPCSVC_ACTOR_ERROR;
}
@@ -2663,7 +2668,7 @@ nfs3svc_mknod_setattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
stat = NFS3_OK;
nfs3err:
- nfs3_log_newfh_res (rpcsvc_request_xid (cs->req), "MKNOD", stat,
+ nfs3_log_newfh_res (nfs_rpcsvc_request_xid (cs->req), "MKNOD", stat,
op_errno, &cs->fh);
nfs3_mknod_reply (cs->req, stat, &cs->fh, postop, &cs->preparent,
&cs->postparent);
@@ -2708,7 +2713,8 @@ nfs3svc_mknod_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
stat = nfs3_errno_to_nfsstat3 (-ret);
nfs3err:
if (ret < 0) {
- nfs3_log_newfh_res (rpcsvc_request_xid (cs->req), "MKNOD", stat,
+ nfs3_log_newfh_res (nfs_rpcsvc_request_xid (cs->req), "MKNOD",
+ stat,
op_errno, &cs->fh);
nfs3_mknod_reply (cs->req, stat, &cs->fh, buf, preparent,
postparent);
@@ -2806,8 +2812,8 @@ nfs3_mknod_resume (void *carg)
nfs3err:
if (ret < 0) {
- nfs3_log_common_res (rpcsvc_request_xid (cs->req), "MKNOD",stat,
- -ret);
+ nfs3_log_common_res (nfs_rpcsvc_request_xid (cs->req), "MKNOD",
+ stat, -ret);
nfs3_mknod_reply (cs->req, stat, NULL, NULL, NULL, NULL);
nfs3_call_state_wipe (cs);
}
@@ -2833,7 +2839,8 @@ nfs3_mknod (rpcsvc_request_t *req, struct nfs3_fh *fh, char *name,
return -1;
}
- nfs3_log_mknod_call (rpcsvc_request_xid (req), fh, name,nodedata->type);
+ nfs3_log_mknod_call (nfs_rpcsvc_request_xid (req), fh, name,
+ nodedata->type);
nfs3_validate_gluster_fh (fh, stat, nfs3err);
nfs3_validate_nfs3_state (req, nfs3, stat, nfs3err, ret);
nfs3_validate_strlen_or_goto (name, NFS_NAME_MAX, nfs3err, stat, ret);
@@ -2868,8 +2875,8 @@ nfs3_mknod (rpcsvc_request_t *req, struct nfs3_fh *fh, char *name,
nfs3err:
if (ret < 0) {
- nfs3_log_common_res (rpcsvc_request_xid (req), "MKNOD", stat,
- -ret);
+ nfs3_log_common_res (nfs_rpcsvc_request_xid (req), "MKNOD",
+ stat, -ret);
nfs3_mknod_reply (req, stat, NULL, NULL, NULL, NULL);
/* Ret must be 0 after this so that the caller does not
* also send an RPC reply.
@@ -2895,14 +2902,14 @@ nfs3svc_mknod (rpcsvc_request_t *req)
nfs3_prep_mknod3args (&args, &fh, name);
if (xdr_to_mknod3args (req->msg, &args) <= 0) {
gf_log (GF_NFS3, GF_LOG_ERROR, "Error decoding args");
- rpcsvc_request_seterr (req, GARBAGE_ARGS);
+ nfs_rpcsvc_request_seterr (req, GARBAGE_ARGS);
goto rpcerr;
}
ret = nfs3_mknod (req, &fh, name, &args.what);
if (ret < 0) {
gf_log (GF_NFS3, GF_LOG_ERROR, "MKNOD procedure failed");
- rpcsvc_request_seterr (req, SYSTEM_ERR);
+ nfs_rpcsvc_request_seterr (req, SYSTEM_ERR);
ret = RPCSVC_ACTOR_ERROR;
}
@@ -2946,7 +2953,7 @@ nfs3svc_remove_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
* finishes, the file is finally removed.
*/
openfd = fd_lookup (cs->resolvedloc.inode, 0);
- nfs3 = rpcsvc_request_program_private (cs->req);
+ nfs3 = nfs_rpcsvc_request_program_private (cs->req);
if (openfd) {
fd_unref (openfd);
nfs3_fdcache_remove (nfs3, openfd);
@@ -2958,7 +2965,7 @@ nfs3svc_remove_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
*/
inode_unref (cs->resolvedloc.inode);
do_not_unref_cached_fd:
- nfs3_log_common_res (rpcsvc_request_xid (cs->req), "REMOVE", stat,
+ nfs3_log_common_res (nfs_rpcsvc_request_xid (cs->req), "REMOVE", stat,
op_errno);
nfs3_remove_reply (cs->req, stat, preparent, postparent);
nfs3_call_state_wipe (cs);
@@ -3007,7 +3014,7 @@ nfs3_remove_resume (void *carg)
nfs3err:
if (ret < 0) {
- nfs3_log_common_res (rpcsvc_request_xid (cs->req), "REMOVE",
+ nfs3_log_common_res (nfs_rpcsvc_request_xid (cs->req), "REMOVE",
stat, -ret);
nfs3_remove_reply (cs->req, stat, NULL, NULL);
nfs3_call_state_wipe (cs);
@@ -3031,7 +3038,8 @@ nfs3_remove (rpcsvc_request_t *req, struct nfs3_fh *fh, char *name)
return -1;
}
- nfs3_log_fh_entry_call (rpcsvc_request_xid (req), "REMOVE", fh, name);
+ nfs3_log_fh_entry_call (nfs_rpcsvc_request_xid (req), "REMOVE", fh,
+ name);
nfs3_validate_gluster_fh (fh, stat, nfs3err);
nfs3_validate_nfs3_state (req, nfs3, stat, nfs3err, ret);
nfs3_validate_strlen_or_goto (name, NFS_NAME_MAX, nfs3err, stat, ret);
@@ -3045,8 +3053,8 @@ nfs3_remove (rpcsvc_request_t *req, struct nfs3_fh *fh, char *name)
nfs3err:
if (ret < 0) {
- nfs3_log_common_res (rpcsvc_request_xid (req), "REMOVE", stat,
- -ret);
+ nfs3_log_common_res (nfs_rpcsvc_request_xid (req), "REMOVE",
+ stat, -ret);
nfs3_remove_reply (req, stat, NULL, NULL);
nfs3_call_state_wipe (cs);
/* Ret must be 0 after this so that the caller does not
@@ -3072,14 +3080,14 @@ nfs3svc_remove (rpcsvc_request_t *req)
nfs3_prep_remove3args (&args, &fh, name);
if (xdr_to_remove3args (req->msg, &args) <= 0) {
gf_log (GF_NFS3, GF_LOG_ERROR, "Error decoding args");
- rpcsvc_request_seterr (req, GARBAGE_ARGS);
+ nfs_rpcsvc_request_seterr (req, GARBAGE_ARGS);
goto rpcerr;
}
ret = nfs3_remove (req, &fh, name);
if (ret < 0) {
gf_log (GF_NFS3, GF_LOG_ERROR, "REMOVE procedure failed");
- rpcsvc_request_seterr (req, SYSTEM_ERR);
+ nfs_rpcsvc_request_seterr (req, SYSTEM_ERR);
ret = RPCSVC_ACTOR_ERROR;
}
@@ -3119,7 +3127,7 @@ nfs3svc_rmdir_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
stat = NFS3_OK;
}
- nfs3_log_common_res (rpcsvc_request_xid (cs->req), "RMDIR", stat,
+ nfs3_log_common_res (nfs_rpcsvc_request_xid (cs->req), "RMDIR", stat,
op_errno);
nfs3_rmdir_reply (cs->req, stat, preparent, postparent);
nfs3_call_state_wipe (cs);
@@ -3148,7 +3156,7 @@ nfs3_rmdir_resume (void *carg)
nfs3err:
if (ret < 0) {
- nfs3_log_common_res (rpcsvc_request_xid (cs->req), "RMDIR",
+ nfs3_log_common_res (nfs_rpcsvc_request_xid (cs->req), "RMDIR",
stat, -ret);
nfs3_rmdir_reply (cs->req, stat, NULL, NULL);
nfs3_call_state_wipe (cs);
@@ -3173,7 +3181,8 @@ nfs3_rmdir (rpcsvc_request_t *req, struct nfs3_fh *fh, char *name)
return -1;
}
- nfs3_log_fh_entry_call (rpcsvc_request_xid (req), "RMDIR", fh, name);
+ nfs3_log_fh_entry_call (nfs_rpcsvc_request_xid (req), "RMDIR", fh,
+ name);
nfs3_validate_gluster_fh (fh, stat, nfs3err);
nfs3_validate_nfs3_state (req, nfs3, stat, nfs3err, ret);
nfs3_validate_strlen_or_goto (name, NFS_NAME_MAX, nfs3err, stat, ret);
@@ -3187,8 +3196,8 @@ nfs3_rmdir (rpcsvc_request_t *req, struct nfs3_fh *fh, char *name)
nfs3err:
if (ret < 0) {
- nfs3_log_common_res (rpcsvc_request_xid (req), "RMDIR", stat,
- -ret);
+ nfs3_log_common_res (nfs_rpcsvc_request_xid (req), "RMDIR",
+ stat, -ret);
nfs3_rmdir_reply (req, stat, NULL, NULL);
nfs3_call_state_wipe (cs);
/* Ret must be 0 after this so that the caller does not
@@ -3214,14 +3223,14 @@ nfs3svc_rmdir (rpcsvc_request_t *req)
nfs3_prep_rmdir3args (&args, &fh, name);
if (xdr_to_rmdir3args (req->msg, &args) <= 0) {
gf_log (GF_NFS3, GF_LOG_ERROR, "Error decoding args");
- rpcsvc_request_seterr (req, GARBAGE_ARGS);
+ nfs_rpcsvc_request_seterr (req, GARBAGE_ARGS);
goto rpcerr;
}
ret = nfs3_rmdir (req, &fh, name);
if (ret < 0) {
gf_log (GF_NFS3, GF_LOG_ERROR, "RMDIR procedure failed");
- rpcsvc_request_seterr (req, SYSTEM_ERR);
+ nfs_rpcsvc_request_seterr (req, SYSTEM_ERR);
ret = RPCSVC_ACTOR_ERROR;
}
@@ -3268,7 +3277,8 @@ nfs3svc_rename_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
stat = NFS3_OK;
nfs3err:
- nfs3_log_common_res (rpcsvc_request_xid (cs->req), "RENAME", stat,-ret);
+ nfs3_log_common_res (nfs_rpcsvc_request_xid (cs->req), "RENAME", stat,
+ -ret);
nfs3_rename_reply (cs->req, stat, buf, preoldparent, postoldparent,
prenewparent, postnewparent);
nfs3_call_state_wipe (cs);
@@ -3298,7 +3308,7 @@ nfs3_rename_resume_dst (void *carg)
nfs3err:
if (ret < 0) {
- nfs3_log_common_res (rpcsvc_request_xid (cs->req), "RENAME",
+ nfs3_log_common_res (nfs_rpcsvc_request_xid (cs->req), "RENAME",
stat, -ret);
nfs3_rename_reply (cs->req, stat, NULL, NULL, NULL, NULL, NULL);
nfs3_call_state_wipe (cs);
@@ -3334,7 +3344,7 @@ nfs3_rename_resume_src (void *carg)
nfs3err:
if (ret < 0) {
- nfs3_log_common_res (rpcsvc_request_xid (cs->req), "RENAME",
+ nfs3_log_common_res (nfs_rpcsvc_request_xid (cs->req), "RENAME",
stat, -ret);
nfs3_rename_reply (cs->req, stat, NULL, NULL, NULL, NULL, NULL);
nfs3_call_state_wipe (cs);
@@ -3359,7 +3369,7 @@ nfs3_rename (rpcsvc_request_t *req, struct nfs3_fh *olddirfh, char *oldname,
return -1;
}
- nfs3_log_rename_call (rpcsvc_request_xid (req), olddirfh, oldname,
+ nfs3_log_rename_call (nfs_rpcsvc_request_xid (req), olddirfh, oldname,
newdirfh, newname);
nfs3_validate_gluster_fh (olddirfh, stat, nfs3err);
nfs3_validate_gluster_fh (newdirfh, stat, nfs3err);
@@ -3388,8 +3398,8 @@ nfs3_rename (rpcsvc_request_t *req, struct nfs3_fh *olddirfh, char *oldname,
nfs3err:
if (ret < 0) {
- nfs3_log_common_res (rpcsvc_request_xid (req), "RENAME", stat,
- -ret);
+ nfs3_log_common_res (nfs_rpcsvc_request_xid (req), "RENAME",
+ stat, -ret);
nfs3_rename_reply (req, stat, NULL, NULL, NULL, NULL, NULL);
nfs3_call_state_wipe (cs);
/* Ret must be 0 after this so that the caller does not
@@ -3417,14 +3427,14 @@ nfs3svc_rename (rpcsvc_request_t *req)
nfs3_prep_rename3args (&args, &olddirfh, oldname, &newdirfh, newname);
if (xdr_to_rename3args (req->msg, &args) <= 0) {
gf_log (GF_NFS3, GF_LOG_ERROR, "Error decoding args");
- rpcsvc_request_seterr (req, GARBAGE_ARGS);
+ nfs_rpcsvc_request_seterr (req, GARBAGE_ARGS);
goto rpcerr;
}
ret = nfs3_rename (req, &olddirfh, oldname, &newdirfh, newname);
if (ret < 0) {
gf_log (GF_NFS3, GF_LOG_ERROR, "RENAME procedure failed");
- rpcsvc_request_seterr (req, SYSTEM_ERR);
+ nfs_rpcsvc_request_seterr (req, SYSTEM_ERR);
ret = RPCSVC_ACTOR_ERROR;
}
@@ -3464,7 +3474,7 @@ nfs3svc_link_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
else
stat = NFS3_OK;
- nfs3_log_common_res (rpcsvc_request_xid (cs->req), "LINK", stat,
+ nfs3_log_common_res (nfs_rpcsvc_request_xid (cs->req), "LINK", stat,
op_errno);
nfs3_link_reply (cs->req, stat, buf, preparent, postparent);
nfs3_call_state_wipe (cs);
@@ -3495,8 +3505,8 @@ nfs3_link_resume_lnk (void *carg)
nfs3err:
if (ret < 0) {
- nfs3_log_common_res (rpcsvc_request_xid (cs->req), "LINK", stat,
- -ret);
+ nfs3_log_common_res (nfs_rpcsvc_request_xid (cs->req), "LINK",
+ stat, -ret);
nfs3_link_reply (cs->req, stat, NULL, NULL, NULL);
nfs3_call_state_wipe (cs);
}
@@ -3526,8 +3536,8 @@ nfs3_link_resume_tgt (void *carg)
nfs3err:
if (ret < 0) {
- nfs3_log_common_res (rpcsvc_request_xid (cs->req), "LINK", stat,
- -ret);
+ nfs3_log_common_res (nfs_rpcsvc_request_xid (cs->req), "LINK",
+ stat, -ret);
nfs3_link_reply (cs->req, stat, NULL, NULL, NULL);
nfs3_call_state_wipe (cs);
}
@@ -3574,7 +3584,7 @@ nfs3_link (rpcsvc_request_t *req, struct nfs3_fh *targetfh,
nfs3err:
if (ret < 0) {
- nfs3_log_common_res (rpcsvc_request_xid (req), "LINK", stat,
+ nfs3_log_common_res (nfs_rpcsvc_request_xid (req), "LINK", stat,
-ret);
nfs3_link_reply (req, stat, NULL, NULL, NULL);
nfs3_call_state_wipe (cs);
@@ -3601,14 +3611,14 @@ nfs3svc_link (rpcsvc_request_t *req)
nfs3_prep_link3args (&args, &targetfh, &dirfh, newpath);
if (xdr_to_link3args (req->msg, &args) <= 0) {
gf_log (GF_NFS3, GF_LOG_ERROR, "Error decoding args");
- rpcsvc_request_seterr (req, GARBAGE_ARGS);
+ nfs_rpcsvc_request_seterr (req, GARBAGE_ARGS);
goto rpcerr;
}
ret = nfs3_link (req, &targetfh, &dirfh, newpath);
if (ret < 0) {
gf_log (GF_NFS3, GF_LOG_ERROR, "LINK procedure failed");
- rpcsvc_request_seterr (req, SYSTEM_ERR);
+ nfs_rpcsvc_request_seterr (req, SYSTEM_ERR);
ret = RPCSVC_ACTOR_ERROR;
}
@@ -3676,14 +3686,14 @@ nfs3svc_readdir_fstat_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
stat = NFS3_OK;
nfs3err:
if (cs->maxcount == 0) {
- nfs3_log_readdir_res (rpcsvc_request_xid (cs->req), stat,
+ nfs3_log_readdir_res (nfs_rpcsvc_request_xid (cs->req), stat,
op_errno, (uintptr_t)cs->fd,
cs->dircount, is_eof);
nfs3_readdir_reply (cs->req, stat, &cs->parent,
(uintptr_t)cs->fd, buf, &cs->entries,
cs->dircount, is_eof);
} else {
- nfs3_log_readdirp_res (rpcsvc_request_xid (cs->req), stat,
+ nfs3_log_readdirp_res (nfs_rpcsvc_request_xid (cs->req), stat,
op_errno, (uintptr_t)cs->fd,
cs->dircount, cs->maxcount, is_eof);
nfs3_readdirp_reply (cs->req, stat, &cs->parent,
@@ -3734,12 +3744,12 @@ err:
goto ret;
if (cs->maxcount == 0) {
- nfs3_log_common_res (rpcsvc_request_xid (cs->req), "READDIR",
- stat, op_errno);
+ nfs3_log_common_res (nfs_rpcsvc_request_xid (cs->req),
+ "READDIR", stat, op_errno);
nfs3_readdir_reply (cs->req, stat, NULL, 0, NULL, NULL, 0, 0);
} else {
- nfs3_log_common_res (rpcsvc_request_xid (cs->req), "READDIRP"
- , stat, op_errno);
+ nfs3_log_common_res (nfs_rpcsvc_request_xid (cs->req),
+ "READDIRP", stat, op_errno);
nfs3_readdirp_reply (cs->req, stat, NULL, 0, NULL, NULL,
0, 0, 0);
}
@@ -3783,7 +3793,7 @@ nfs3_readdir_read_resume (void *carg)
cs = (nfs3_call_state_t *)carg;
nfs3_check_fh_resolve_status (cs, stat, nfs3err);
- nfs3 = rpcsvc_request_program_private (cs->req);
+ nfs3 = nfs_rpcsvc_request_program_private (cs->req);
ret = nfs3_verify_dircookie (nfs3, cs->fd, cs->cookie, cs->cookieverf,
&stat);
if (ret < 0) /* Stat already set by verifier function above. */
@@ -3795,12 +3805,12 @@ nfs3_readdir_read_resume (void *carg)
nfs3err:
if (ret < 0) {
if (cs->maxcount == 0) {
- nfs3_log_common_res (rpcsvc_request_xid (cs->req),
+ nfs3_log_common_res (nfs_rpcsvc_request_xid (cs->req),
"READDIR", stat, -ret);
nfs3_readdir_reply (cs->req, stat, NULL, 0, NULL, NULL,
0, 0);
} else {
- nfs3_log_common_res (rpcsvc_request_xid (cs->req),
+ nfs3_log_common_res (nfs_rpcsvc_request_xid (cs->req),
"READDIRP", stat, -ret);
nfs3_readdirp_reply (cs->req, stat, NULL, 0, NULL, NULL,
0, 0, 0);
@@ -3831,12 +3841,12 @@ nfs3_readdir_open_resume (void *carg)
nfs3err:
if (ret < 0) {
if (cs->maxcount == 0) {
- nfs3_log_common_res (rpcsvc_request_xid (cs->req),
+ nfs3_log_common_res (nfs_rpcsvc_request_xid (cs->req),
"READDIR", stat, -ret);
nfs3_readdir_reply (cs->req, stat, NULL, 0, NULL, NULL,
0, 0);
} else {
- nfs3_log_common_res (rpcsvc_request_xid (cs->req),
+ nfs3_log_common_res (nfs_rpcsvc_request_xid (cs->req),
"READDIRP", stat, -ret);
nfs3_readdirp_reply (cs->req, stat, NULL, 0, NULL, NULL,
0, 0, 0);
@@ -3864,7 +3874,8 @@ nfs3_readdir (rpcsvc_request_t *req, struct nfs3_fh *fh, cookie3 cookie,
return -1;
}
- nfs3_log_readdir_call (rpcsvc_request_xid (req), fh, dircount,maxcount);
+ nfs3_log_readdir_call (nfs_rpcsvc_request_xid (req), fh, dircount,
+ maxcount);
nfs3_validate_gluster_fh (fh, stat, nfs3err);
nfs3_validate_nfs3_state (req, nfs3, stat, nfs3err, ret);
nfs3_map_fh_to_volume (nfs3, fh, req, vol, stat, nfs3err);
@@ -3883,13 +3894,13 @@ nfs3_readdir (rpcsvc_request_t *req, struct nfs3_fh *fh, cookie3 cookie,
nfs3err:
if (ret < 0) {
if (maxcount == 0) {
- nfs3_log_common_res (rpcsvc_request_xid (req), "READDIR"
- , stat, -ret);
+ nfs3_log_common_res (nfs_rpcsvc_request_xid (req),
+ "READDIR", stat, -ret);
nfs3_readdir_reply (req, stat, NULL, 0, NULL, NULL, 0,
0);
} else {
- nfs3_log_common_res (rpcsvc_request_xid (req),"READDIRP"
- , stat, -ret);
+ nfs3_log_common_res (nfs_rpcsvc_request_xid (req),
+ "READDIRP", stat, -ret);
nfs3_readdirp_reply (req, stat, NULL, 0, NULL, NULL, 0,
0, 0);
}
@@ -3917,7 +3928,7 @@ nfs3svc_readdir (rpcsvc_request_t *req)
nfs3_prep_readdir3args (&ra, &fh);
if (xdr_to_readdir3args (req->msg, &ra) <= 0) {
gf_log (GF_NFS3, GF_LOG_ERROR, "Error decoding args");
- rpcsvc_request_seterr (req, GARBAGE_ARGS);
+ nfs_rpcsvc_request_seterr (req, GARBAGE_ARGS);
goto rpcerr;
}
@@ -3925,7 +3936,7 @@ nfs3svc_readdir (rpcsvc_request_t *req)
ret = nfs3_readdir (req, &fh, ra.cookie, verf, ra.count, 0);
if (ret < 0) {
gf_log (GF_NFS3, GF_LOG_ERROR, "READDIR procedure failed");
- rpcsvc_request_seterr (req, SYSTEM_ERR);
+ nfs_rpcsvc_request_seterr (req, SYSTEM_ERR);
ret = RPCSVC_ACTOR_ERROR;
}
@@ -3947,7 +3958,7 @@ nfs3svc_readdirp (rpcsvc_request_t *req)
nfs3_prep_readdirp3args (&ra, &fh);
if (xdr_to_readdirp3args (req->msg, &ra) <= 0) {
gf_log (GF_NFS3, GF_LOG_ERROR, "Error decoding args");
- rpcsvc_request_seterr (req, GARBAGE_ARGS);
+ nfs_rpcsvc_request_seterr (req, GARBAGE_ARGS);
goto rpcerr;
}
@@ -3956,7 +3967,7 @@ nfs3svc_readdirp (rpcsvc_request_t *req)
ra.maxcount);
if (ret < 0) {
gf_log (GF_NFS3, GF_LOG_ERROR, "READDIRP procedure failed");
- rpcsvc_request_seterr (req, SYSTEM_ERR);
+ nfs_rpcsvc_request_seterr (req, SYSTEM_ERR);
ret = RPCSVC_ACTOR_ERROR;
}
@@ -3993,7 +4004,7 @@ nfs3_fsstat_stat_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
else
stat = NFS3_OK;
- nfs3_log_common_res (rpcsvc_request_xid (cs->req), "FSTAT", stat,
+ nfs3_log_common_res (nfs_rpcsvc_request_xid (cs->req), "FSTAT", stat,
op_errno);
nfs3_fsstat_reply (cs->req, stat, &cs->fsstat, buf);
nfs3_call_state_wipe (cs);
@@ -4029,7 +4040,7 @@ nfs3_fsstat_statfs_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
err:
if (ret < 0) {
- nfs3_log_common_res (rpcsvc_request_xid (cs->req), "FSTAT",
+ nfs3_log_common_res (nfs_rpcsvc_request_xid (cs->req), "FSTAT",
stat, -ret);
nfs3_fsstat_reply (cs->req, stat, NULL, NULL);
nfs3_call_state_wipe (cs);
@@ -4061,8 +4072,8 @@ nfs3_fsstat_resume (void *carg)
nfs3err:
if (ret < 0) {
- nfs3_log_common_res (rpcsvc_request_xid (cs->req), "FSTAT",
- stat, -ret);
+ nfs3_log_common_res (nfs_rpcsvc_request_xid (cs->req), "FSTAT",
+ stat, -ret);
nfs3_fsstat_reply (cs->req, stat, NULL, NULL);
nfs3_call_state_wipe (cs);
}
@@ -4086,7 +4097,7 @@ nfs3_fsstat (rpcsvc_request_t *req, struct nfs3_fh *fh)
return -1;
}
- nfs3_log_common_call (rpcsvc_request_xid (req), "FSSTAT", fh);
+ nfs3_log_common_call (nfs_rpcsvc_request_xid (req), "FSSTAT", fh);
nfs3_validate_gluster_fh (fh, stat, nfs3err);
nfs3_validate_nfs3_state (req, nfs3, stat, nfs3err, ret);
nfs3_map_fh_to_volume (nfs3, fh, req, vol, stat, nfs3err);
@@ -4098,8 +4109,8 @@ nfs3_fsstat (rpcsvc_request_t *req, struct nfs3_fh *fh)
nfs3err:
if (ret < 0) {
- nfs3_log_common_res (rpcsvc_request_xid (req), "FSTAT", stat,
- -ret);
+ nfs3_log_common_res (nfs_rpcsvc_request_xid (req), "FSTAT",
+ stat, -ret);
nfs3_fsstat_reply (req, stat, NULL, NULL);
nfs3_call_state_wipe (cs);
/* Ret must be 0 after this so that the caller does not
@@ -4124,14 +4135,14 @@ nfs3svc_fsstat (rpcsvc_request_t *req)
nfs3_prep_fsstat3args (&args, &fh);
if (xdr_to_fsstat3args (req->msg, &args) <= 0) {
gf_log (GF_NFS3, GF_LOG_ERROR, "Error decoding args");
- rpcsvc_request_seterr (req, GARBAGE_ARGS);
+ nfs_rpcsvc_request_seterr (req, GARBAGE_ARGS);
goto rpcerr;
}
ret = nfs3_fsstat (req, &fh);
if (ret < 0) {
gf_log (GF_NFS3, GF_LOG_ERROR, "FSTAT procedure failed");
- rpcsvc_request_seterr (req, SYSTEM_ERR);
+ nfs_rpcsvc_request_seterr (req, SYSTEM_ERR);
ret = RPCSVC_ACTOR_ERROR;
}
@@ -4148,7 +4159,7 @@ nfs3_fsinfo_reply (rpcsvc_request_t *req, nfsstat3 status, struct iatt *fsroot)
uint16_t xlid = 0;
xlid = nfs3_request_xlator_id (req);
- nfs3 = rpcsvc_request_program_private (req);
+ nfs3 = nfs_rpcsvc_request_program_private (req);
nfs3_fill_fsinfo3res (nfs3, &res, status, fsroot, xlid);
nfs3svc_submit_reply (req, &res,
@@ -4171,7 +4182,7 @@ nfs3svc_fsinfo_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
else
status = NFS3_OK;
- nfs3_log_common_res (rpcsvc_request_xid (cs->req), "FSINFO", status,
+ nfs3_log_common_res (nfs_rpcsvc_request_xid (cs->req), "FSINFO", status,
op_errno);
nfs3_fsinfo_reply (cs->req, status, buf);
@@ -4204,7 +4215,7 @@ nfs3_fsinfo_resume (void *carg)
nfs3err:
if (ret < 0) {
- nfs3_log_common_res (rpcsvc_request_xid (cs->req), "FSINFO",
+ nfs3_log_common_res (nfs_rpcsvc_request_xid (cs->req), "FSINFO",
stat, -ret);
nfs3_fsinfo_reply (cs->req, stat, NULL);
nfs3_call_state_wipe (cs);
@@ -4228,7 +4239,7 @@ nfs3_fsinfo (rpcsvc_request_t *req, struct nfs3_fh *fh)
return -1;
}
- nfs3_log_common_call (rpcsvc_request_xid (req), "FSINFO", fh);
+ nfs3_log_common_call (nfs_rpcsvc_request_xid (req), "FSINFO", fh);
nfs3_validate_gluster_fh (fh, stat, nfs3err);
nfs3_validate_nfs3_state (req, nfs3, stat, nfs3err, ret);
nfs3_map_fh_to_volume (nfs3, fh, req, vol, stat, nfs3err);
@@ -4240,8 +4251,8 @@ nfs3_fsinfo (rpcsvc_request_t *req, struct nfs3_fh *fh)
nfs3err:
if (ret < 0) {
- nfs3_log_common_res (rpcsvc_request_xid (req), "FSINFO", stat,
- -ret);
+ nfs3_log_common_res (nfs_rpcsvc_request_xid (req), "FSINFO",
+ stat, -ret);
nfs3_fsinfo_reply (req, stat, NULL);
nfs3_call_state_wipe (cs);
ret = 0;
@@ -4264,14 +4275,14 @@ nfs3svc_fsinfo (rpcsvc_request_t *req)
nfs3_prep_fsinfo3args (&args, &root);
if (xdr_to_fsinfo3args (req->msg, &args) <= 0) {
gf_log (GF_NFS3, GF_LOG_ERROR, "Error decoding arguments");
- rpcsvc_request_seterr (req, GARBAGE_ARGS);
+ nfs_rpcsvc_request_seterr (req, GARBAGE_ARGS);
goto rpcerr;
}
ret = nfs3_fsinfo (req, &root);
if (ret < 0) {
gf_log (GF_NFS3, GF_LOG_ERROR, "FSINFO procedure failed");
- rpcsvc_request_seterr (req, SYSTEM_ERR);
+ nfs_rpcsvc_request_seterr (req, SYSTEM_ERR);
ret = RPCSVC_ACTOR_ERROR;
}
@@ -4313,7 +4324,7 @@ nfs3svc_pathconf_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
stat = NFS3_OK;
}
- nfs3_log_common_res (rpcsvc_request_xid (cs->req), "PATHCONF", stat,
+ nfs3_log_common_res (nfs_rpcsvc_request_xid (cs->req), "PATHCONF", stat,
op_errno);
nfs3_pathconf_reply (cs->req, stat, sbuf);
nfs3_call_state_wipe (cs);
@@ -4342,8 +4353,8 @@ nfs3_pathconf_resume (void *carg)
stat = nfs3_errno_to_nfsstat3 (-ret);
nfs3err:
if (ret < 0) {
- nfs3_log_common_res (rpcsvc_request_xid (cs->req), "PATHCONF",
- stat, -ret);
+ nfs3_log_common_res (nfs_rpcsvc_request_xid (cs->req),
+ "PATHCONF", stat, -ret);
nfs3_pathconf_reply (cs->req, stat, NULL);
nfs3_call_state_wipe (cs);
}
@@ -4365,7 +4376,7 @@ nfs3_pathconf (rpcsvc_request_t *req, struct nfs3_fh *fh)
return -1;
}
- nfs3_log_common_call (rpcsvc_request_xid (req), "PATHCONF", fh);
+ nfs3_log_common_call (nfs_rpcsvc_request_xid (req), "PATHCONF", fh);
nfs3_validate_gluster_fh (fh, stat, nfs3err);
nfs3_validate_nfs3_state (req, nfs3, stat, nfs3err, ret);
nfs3_map_fh_to_volume (nfs3, fh, req, vol, stat, nfs3err);
@@ -4377,8 +4388,8 @@ nfs3_pathconf (rpcsvc_request_t *req, struct nfs3_fh *fh)
nfs3err:
if (ret < 0) {
- nfs3_log_common_res (rpcsvc_request_xid (req), "PATHCONF", stat,
- -ret);
+ nfs3_log_common_res (nfs_rpcsvc_request_xid (req), "PATHCONF",
+ stat, -ret);
nfs3_pathconf_reply (req, stat, NULL);
nfs3_call_state_wipe (cs);
/* Ret must be 0 after this so that the caller does not
@@ -4403,14 +4414,14 @@ nfs3svc_pathconf (rpcsvc_request_t *req)
nfs3_prep_pathconf3args (&args, &fh);
if (xdr_to_pathconf3args (req->msg, &args) <= 0) {
gf_log (GF_NFS3, GF_LOG_ERROR, "Error decoding args");
- rpcsvc_request_seterr (req, GARBAGE_ARGS);
+ nfs_rpcsvc_request_seterr (req, GARBAGE_ARGS);
goto rpcerr;
}
ret = nfs3_pathconf (req, &fh);
if (ret < 0) {
gf_log (GF_NFS3, GF_LOG_ERROR, "PATHCONF procedure failed");
- rpcsvc_request_seterr (req, SYSTEM_ERR);
+ nfs_rpcsvc_request_seterr (req, SYSTEM_ERR);
ret = RPCSVC_ACTOR_ERROR;
}
@@ -4449,8 +4460,8 @@ nfs3svc_commit_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
else
stat = NFS3_OK;
- nfs3 = rpcsvc_request_program_private (cs->req);
- nfs3_log_commit_res (rpcsvc_request_xid (cs->req), stat, op_errno,
+ nfs3 = nfs_rpcsvc_request_program_private (cs->req);
+ nfs3_log_commit_res (nfs_rpcsvc_request_xid (cs->req), stat, op_errno,
nfs3->serverstart);
nfs3_commit_reply (cs->req, stat, nfs3->serverstart, prebuf, postbuf);
nfs3_call_state_wipe (cs);
@@ -4486,7 +4497,7 @@ nfs3_commit_resume (void *carg)
nfs3err:
if (ret < 0) {
- nfs3_log_common_res (rpcsvc_request_xid (cs->req), "COMMIT",
+ nfs3_log_common_res (nfs_rpcsvc_request_xid (cs->req), "COMMIT",
stat, -ret);
nfs3_commit_reply (cs->req, stat, cs->nfs3state->serverstart,
NULL, NULL);
@@ -4516,7 +4527,7 @@ nfs3_commit_open_resume (void *carg)
stat = nfs3_errno_to_nfsstat3 (-ret);
nfs3err:
if (ret < 0) {
- nfs3_log_common_res (rpcsvc_request_xid (cs->req), "COMMIT",
+ nfs3_log_common_res (nfs_rpcsvc_request_xid (cs->req), "COMMIT",
stat, -ret);
nfs3_commit_reply (cs->req, stat, 0, NULL, NULL);
nfs3_call_state_wipe (cs);
@@ -4542,8 +4553,8 @@ nfs3_commit (rpcsvc_request_t *req, struct nfs3_fh *fh, offset3 offset,
return -1;
}
- nfs3_log_rw_call (rpcsvc_request_xid (req), "COMMIT", fh, offset, count,
- -1);
+ nfs3_log_rw_call (nfs_rpcsvc_request_xid (req), "COMMIT", fh, offset,
+ count, -1);
nfs3_validate_gluster_fh (fh, stat, nfs3err);
nfs3_validate_nfs3_state (req, nfs3, stat, nfs3err, ret);
nfs3_map_fh_to_volume (nfs3, fh, req, vol, stat, nfs3err);
@@ -4559,8 +4570,8 @@ nfs3_commit (rpcsvc_request_t *req, struct nfs3_fh *fh, offset3 offset,
nfs3err:
if (ret < 0) {
- nfs3_log_common_res (rpcsvc_request_xid (req), "COMMIT", stat,
- -ret);
+ nfs3_log_common_res (nfs_rpcsvc_request_xid (req), "COMMIT",
+ stat, -ret);
nfs3_commit_reply (req, stat, 0, NULL, NULL);
nfs3_call_state_wipe (cs);
ret = 0;
@@ -4583,14 +4594,14 @@ nfs3svc_commit (rpcsvc_request_t *req)
nfs3_prep_commit3args (&args, &fh);
if (xdr_to_commit3args (req->msg, &args) <= 0) {
gf_log (GF_NFS3, GF_LOG_ERROR, "Error decoding args");
- rpcsvc_request_seterr (req, GARBAGE_ARGS);
+ nfs_rpcsvc_request_seterr (req, GARBAGE_ARGS);
goto rpcerr;
}
ret = nfs3_commit (req, &fh, args.offset, args.count);
if (ret < 0) {
gf_log (GF_NFS3, GF_LOG_ERROR, "COMMIT procedure failed");
- rpcsvc_request_seterr (req, SYSTEM_ERR);
+ nfs_rpcsvc_request_seterr (req, SYSTEM_ERR);
ret = RPCSVC_ACTOR_ERROR;
}