From 590ae48c65a60c93c2e5407e3f663cef3daacc55 Mon Sep 17 00:00:00 2001 From: Amar Tumballi Date: Wed, 19 Jul 2017 23:08:05 +0530 Subject: 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 auth.allow "/subdir1(192.168.1.*),/(192.168.10.*),/subdir2(192.168.8.*)"` Updates #175 Change-Id: I7ea57f76ddbe6c3862cfe02e13f89e8a39719e11 Signed-off-by: Amar Tumballi Reviewed-on: https://review.gluster.org/17141 Smoke: Gluster Build System Reviewed-by: Shyamsundar Ranganathan CentOS-regression: Gluster Build System --- xlators/protocol/server/src/server-common.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'xlators/protocol/server/src/server-common.h') diff --git a/xlators/protocol/server/src/server-common.h b/xlators/protocol/server/src/server-common.h index f3b9ced939c..3fa972e68db 100644 --- a/xlators/protocol/server/src/server-common.h +++ b/xlators/protocol/server/src/server-common.h @@ -9,7 +9,8 @@ #include "xdr-nfs3.h" void -server_post_stat (gfs3_stat_rsp *rsp, struct iatt *stbuf); +server_post_stat (server_state_t *state, + gfs3_stat_rsp *rsp, struct iatt *stbuf); void server_post_readlink (gfs3_readlink_rsp *rsp, struct iatt *stbuf, @@ -61,7 +62,8 @@ server_post_ftruncate (gfs3_ftruncate_rsp *rsp, struct iatt *prebuf, struct iatt *postbuf); void -server_post_fstat (gfs3_fstat_rsp *rsp, struct iatt *stbuf); +server_post_fstat (server_state_t *state, + gfs3_fstat_rsp *rsp, struct iatt *stbuf); void server_post_lk (xlator_t *this, gfs3_lk_rsp *rsp, struct gf_flock *lock); -- cgit