|
|
21ab4e |
From 717ad177bb1e8ed0a100022669874a45b3c76d22 Mon Sep 17 00:00:00 2001
|
|
|
21ab4e |
From: Amar Tumballi <amarts@redhat.com>
|
|
|
21ab4e |
Date: Wed, 27 Sep 2017 12:42:53 +0530
|
|
|
21ab4e |
Subject: [PATCH 622/622] mount/fuse: Include sub-directory in source argument
|
|
|
21ab4e |
for mount()
|
|
|
21ab4e |
|
|
|
21ab4e |
With this, mount of a sub-directory 'foo' gets listed in /proc/mounts as:
|
|
|
21ab4e |
|
|
|
21ab4e |
<hostname>:<volname>/foo on /mnt/glusterfs type fuse.glusterfs (rw,relatime...)
|
|
|
21ab4e |
|
|
|
21ab4e |
> Upstream:
|
|
|
21ab4e |
> Signed-off-by: Vijay Bellur <vbellur@redhat.com>
|
|
|
21ab4e |
> BUG: 1488913
|
|
|
21ab4e |
> Reviewed-on: https://review.gluster.org/18210
|
|
|
21ab4e |
> Reviewed-by: Niels de Vos <ndevos@redhat.com>
|
|
|
21ab4e |
> Reviewed-by: Amar Tumballi <amarts@redhat.com>
|
|
|
21ab4e |
|
|
|
21ab4e |
BUG: 1017362
|
|
|
21ab4e |
Change-Id: Ib5977a7a21dd4e139d81f2352836e67f09fe90a1
|
|
|
21ab4e |
Signed-Off-By: Amar Tumballi <amarts@redhat.com>
|
|
|
21ab4e |
Reviewed-on: https://code.engineering.redhat.com/gerrit/119139
|
|
|
21ab4e |
Tested-by: RHGS Build Bot <nigelb@redhat.com>
|
|
|
21ab4e |
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
|
|
|
21ab4e |
---
|
|
|
21ab4e |
xlators/mount/fuse/src/fuse-bridge.c | 8 +++++++-
|
|
|
21ab4e |
1 file changed, 7 insertions(+), 1 deletion(-)
|
|
|
21ab4e |
|
|
|
21ab4e |
diff --git a/xlators/mount/fuse/src/fuse-bridge.c b/xlators/mount/fuse/src/fuse-bridge.c
|
|
|
21ab4e |
index a8d936d..6fe52dc 100644
|
|
|
21ab4e |
--- a/xlators/mount/fuse/src/fuse-bridge.c
|
|
|
21ab4e |
+++ b/xlators/mount/fuse/src/fuse-bridge.c
|
|
|
21ab4e |
@@ -5677,9 +5677,13 @@ init (xlator_t *this_xl)
|
|
|
21ab4e |
fsname = cmd_args->volfile;
|
|
|
21ab4e |
if (!fsname && cmd_args->volfile_server) {
|
|
|
21ab4e |
if (cmd_args->volfile_id) {
|
|
|
21ab4e |
+ int dir_len = 0;
|
|
|
21ab4e |
+ if (cmd_args->subdir_mount)
|
|
|
21ab4e |
+ dir_len = strlen (cmd_args->subdir_mount) + 1;
|
|
|
21ab4e |
fsname = GF_MALLOC (
|
|
|
21ab4e |
strlen (cmd_args->volfile_server) + 1 +
|
|
|
21ab4e |
- strlen (cmd_args->volfile_id) + 1,
|
|
|
21ab4e |
+ strlen (cmd_args->volfile_id) + 1 +
|
|
|
21ab4e |
+ dir_len,
|
|
|
21ab4e |
gf_fuse_mt_fuse_private_t);
|
|
|
21ab4e |
if (!fsname) {
|
|
|
21ab4e |
gf_log ("glusterfs-fuse", GF_LOG_ERROR,
|
|
|
21ab4e |
@@ -5690,6 +5694,8 @@ init (xlator_t *this_xl)
|
|
|
21ab4e |
strcpy (fsname, cmd_args->volfile_server);
|
|
|
21ab4e |
strcat (fsname, ":");
|
|
|
21ab4e |
strcat (fsname, cmd_args->volfile_id);
|
|
|
21ab4e |
+ if (dir_len)
|
|
|
21ab4e |
+ strcat (fsname, cmd_args->subdir_mount);
|
|
|
21ab4e |
} else
|
|
|
21ab4e |
fsname = cmd_args->volfile_server;
|
|
|
21ab4e |
}
|
|
|
21ab4e |
--
|
|
|
21ab4e |
1.8.3.1
|
|
|
21ab4e |
|