diff options
author | Amar Tumballi <amarts@redhat.com> | 2017-07-19 23:08:05 +0530 |
---|---|---|
committer | Amar Tumballi <amarts@redhat.com> | 2017-08-04 05:26:42 +0000 |
commit | 590ae48c65a60c93c2e5407e3f663cef3daacc55 (patch) | |
tree | 82e948d6e48900878a9977aceef3535506d05207 /libglusterfs/src/client_t.h | |
parent | f68887999e89d894c3125e3b26517221ad1543fc (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
Change-Id: I7ea57f76ddbe6c3862cfe02e13f89e8a39719e11
Signed-off-by: Amar Tumballi <amarts@redhat.com>
Reviewed-on: https://review.gluster.org/17141
Smoke: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Diffstat (limited to 'libglusterfs/src/client_t.h')
-rw-r--r-- | libglusterfs/src/client_t.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/libglusterfs/src/client_t.h b/libglusterfs/src/client_t.h index 7666f0132b6..530c0a331ea 100644 --- a/libglusterfs/src/client_t.h +++ b/libglusterfs/src/client_t.h @@ -40,6 +40,11 @@ typedef struct _client { char *username; char *passwd; } auth; + + /* subdir_mount */ + char *subdir_mount; + inode_t *subdir_inode; + uuid_t subdir_gfid; } client_t; #define GF_CLIENTCTX_INITIAL_SIZE 8 @@ -72,7 +77,8 @@ typedef struct clienttable clienttable_t; struct rpcsvc_auth_data; client_t * -gf_client_get (xlator_t *this, struct rpcsvc_auth_data *cred, char *client_uid); +gf_client_get (xlator_t *this, struct rpcsvc_auth_data *cred, + char *client_uid, char *subdir_mount); void gf_client_put (client_t *client, gf_boolean_t *detached); |