summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShehjar Tikoo <shehjart@gluster.com>2010-08-31 06:50:37 +0000
committerVijay Bellur <vijay@dev.gluster.com>2010-08-31 07:45:08 -0700
commitda5bf7cf104cd060b2f94d47132029689bfff685 (patch)
tree411c276522ebc47ea199b607896b13df655ec43f
parent73c0aa4c27c50beea25be8de0b27b078dfcfa724 (diff)
nfs, mount3: Fix assumptions of this being child xl
This is plain wrong. this must always be the xlator that receives the callback. Use cookie to access the child subvolume on which the fop was issued. Signed-off-by: Shehjar Tikoo <shehjart@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1410 (nfs uses this for child translator during frame creation) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1410
-rw-r--r--xlators/nfs/server/src/mount3.c13
-rw-r--r--xlators/nfs/server/src/nfs.c2
2 files changed, 9 insertions, 6 deletions
diff --git a/xlators/nfs/server/src/mount3.c b/xlators/nfs/server/src/mount3.c
index ca94b25b705..2a7a36c8f7e 100644
--- a/xlators/nfs/server/src/mount3.c
+++ b/xlators/nfs/server/src/mount3.c
@@ -225,12 +225,14 @@ mnt3svc_lookup_mount_cbk (call_frame_t *frame, void *cookie,
int autharr[10];
int autharrlen = 0;
rpcsvc_t *svc = NULL;
+ xlator_t *mntxl = NULL;
req = (rpcsvc_request_t *)frame->local;
if (!req)
return -1;
+ mntxl = (xlator_t *)cookie;
ms = (struct mount3_state *)nfs_rpcsvc_request_program_private (req);
if (!ms) {
gf_log (GF_MNT, GF_LOG_ERROR, "mount state not found");
@@ -244,13 +246,13 @@ mnt3svc_lookup_mount_cbk (call_frame_t *frame, void *cookie,
if (status != MNT3_OK)
goto xmit_res;
- fh = nfs3_fh_build_root_fh (ms->nfsx->children, this);
- mnt3svc_update_mountlist (ms, req, this->name);
+ fh = nfs3_fh_build_root_fh (ms->nfsx->children, mntxl);
+ mnt3svc_update_mountlist (ms, req, mntxl->name);
xmit_res:
gf_log (GF_MNT, GF_LOG_DEBUG, "Mount reply status: %d", status);
if (op_ret == 0) {
svc = nfs_rpcsvc_request_service (req);
- autharrlen = nfs_rpcsvc_auth_array (svc, this->name, autharr,
+ autharrlen = nfs_rpcsvc_auth_array (svc, mntxl->name, autharr,
10);
}
@@ -480,9 +482,10 @@ mnt3_resolve_subdir_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int autharrlen = 0;
rpcsvc_t *svc = NULL;
mountres3 res = {0, };
+ xlator_t *mntxl = NULL;
mres = frame->local;
-
+ mntxl = (xlator_t *)cookie;
if (op_ret == -1) {
mntstat = mnt3svc_errno_to_mnterr (op_errno);
goto err;
@@ -509,7 +512,7 @@ err:
gf_log (GF_MNT, GF_LOG_DEBUG, "Mount reply status: %d",
mntstat);
svc = nfs_rpcsvc_request_service (mres->req);
- autharrlen = nfs_rpcsvc_auth_array (svc, this->name, autharr,
+ autharrlen = nfs_rpcsvc_auth_array (svc, mntxl->name, autharr,
10);
res = mnt3svc_set_mountres3 (mntstat, &fh, autharr, autharrlen);
diff --git a/xlators/nfs/server/src/nfs.c b/xlators/nfs/server/src/nfs.c
index 033a60ba2ad..8f3c8b2f520 100644
--- a/xlators/nfs/server/src/nfs.c
+++ b/xlators/nfs/server/src/nfs.c
@@ -233,7 +233,7 @@ nfs_start_subvol_lookup_cbk (call_frame_t *frame, void *cookie,
goto err;
}
- gf_log (GF_NFS, GF_LOG_TRACE, "Started %s", this->name);
+ gf_log (GF_NFS, GF_LOG_TRACE, "Started %s", ((xlator_t *)cookie)->name);
err:
return 0;
}