diff options
author | Amar Tumballi <amar@gluster.com> | 2010-09-24 03:17:36 +0000 |
---|---|---|
committer | Vijay Bellur <vijay@dev.gluster.com> | 2010-09-24 03:53:56 -0700 |
commit | e9880384632d8ae489a1f6cdc5429ba6e378ce40 (patch) | |
tree | 68a4918e7acd26ac71e658bdf9b140b4d6c979e9 /xlators/mgmt | |
parent | 6965560fe9f9291093e9d91c5787ce0374371eb8 (diff) |
glusterd: fetch-spec now allows NFS like '/<volume-name>'
To make mount options similar, so less confusion
Signed-off-by: Amar Tumballi <amar@gluster.com>
Signed-off-by: Vijay Bellur <vijay@dev.gluster.com>
BUG: 971 (dynamic volume management)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=971
Diffstat (limited to 'xlators/mgmt')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-handshake.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-handshake.c b/xlators/mgmt/glusterd/src/glusterd-handshake.c index 88549d72763..fbc25d1c602 100644 --- a/xlators/mgmt/glusterd/src/glusterd-handshake.c +++ b/xlators/mgmt/glusterd/src/glusterd-handshake.c @@ -52,7 +52,17 @@ build_volfile_path (const char *volname, char *path, glusterd_volinfo_t *volinfo = NULL; priv = THIS->private; - dup_volname = gf_strdup (volname); + + if (volname[0] != '/') { + /* Normal behavior */ + dup_volname = gf_strdup (volname); + } else { + /* Bringing in NFS like behavior for mount command, */ + /* With this, one can mount a volume with below cmd */ + /* bash# mount -t glusterfs server:/volume /mnt/pnt */ + dup_volname = gf_strdup (&volname[1]); + } + free_ptr = dup_volname; ret = glusterd_volinfo_find (dup_volname, &volinfo); |