summaryrefslogtreecommitdiffstats
path: root/xlators/protocol/server/src/server-helpers.c
diff options
context:
space:
mode:
authorAmar Tumballi <amarts@redhat.com>2017-07-19 23:08:05 +0530
committerShyamsundar Ranganathan <srangana@redhat.com>2017-08-04 13:34:21 +0000
commitae084046cce12a1ce707b5d141f092b4c011e1b3 (patch)
treea601c88c90053677478bdab6c602e36eb2f1f0bd /xlators/protocol/server/src/server-helpers.c
parent9bc0cf820ace2df58fc666f4ff4c7c50973b60a3 (diff)
glusterfsd: allow subdir mount
Changes: 1. Take subdir mount option in client (mount.gluster / glusterfsd) 2. Pass the subdir mount to server-handshake (from client-handshake) 3. Handle subdir-mount dir's lookup in server-first-lookup and handle all fops resolution accordingly with proper gfid of subdir 4. Change the auth/addr module to handle the multiple subdir entries in option, and valid parsing. How to use the feature: `# mount -t glusterfs $hostname:/$volname/$subdir /$mount_point` Or `# mount -t glusterfs $hostname:/$volname -osubdir_mount=$subdir /$mount_point` Option can be set like: `# gluster volume set <volname> auth.allow "/subdir1(192.168.1.*),/(192.168.10.*),/subdir2(192.168.8.*)"` Updates #175 > Reviewed-At: https://review.gluster.org/17141/ Change-Id: I7ea57f76ddbe6c3862cfe02e13f89e8a39719e11 Signed-off-by: Amar Tumballi <amarts@redhat.com> Reviewed-on: https://review.gluster.org/17968 Smoke: Gluster Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com>
Diffstat (limited to 'xlators/protocol/server/src/server-helpers.c')
-rw-r--r--xlators/protocol/server/src/server-helpers.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/xlators/protocol/server/src/server-helpers.c b/xlators/protocol/server/src/server-helpers.c
index 52d7f51a627..381fb6f515e 100644
--- a/xlators/protocol/server/src/server-helpers.c
+++ b/xlators/protocol/server/src/server-helpers.c
@@ -423,6 +423,7 @@ get_frame_from_request (rpcsvc_request_t *req)
clienttable_t *clienttable = NULL;
unsigned int i = 0;
rpc_transport_t *trans = NULL;
+ server_state_t *state = NULL;
GF_VALIDATE_OR_GOTO ("server", req, out);
@@ -507,6 +508,9 @@ get_frame_from_request (rpcsvc_request_t *req)
frame->local = req;
+
+ state = CALL_STATE (frame);
+ state->client = client;
out:
return frame;
}
@@ -2225,7 +2229,7 @@ server_populate_compound_response (xlator_t *this, gfs3_compound_rsp *rsp,
rsp_args->xdata.xdata_len,
rsp_args->op_errno, out);
if (!this_args_cbk->op_ret) {
- server_post_stat (rsp_args,
+ server_post_stat (state, rsp_args,
&this_args_cbk->stat);
}
rsp_args->op_ret = this_args_cbk->op_ret;
@@ -2728,8 +2732,8 @@ server_populate_compound_response (xlator_t *this, gfs3_compound_rsp *rsp,
rsp_args->xdata.xdata_len,
rsp_args->op_errno, out);
if (!this_args_cbk->op_ret) {
- server_post_fstat (rsp_args,
- &this_args_cbk->stat);
+ server_post_fstat (state, rsp_args,
+ &this_args_cbk->stat);
}
rsp_args->op_ret = this_args_cbk->op_ret;
rsp_args->op_errno = gf_errno_to_error