summaryrefslogtreecommitdiffstats
path: root/xlators/mount/fuse/src/fuse-bridge.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/mount/fuse/src/fuse-bridge.c')
-rw-r--r--xlators/mount/fuse/src/fuse-bridge.c28
1 files changed, 8 insertions, 20 deletions
diff --git a/xlators/mount/fuse/src/fuse-bridge.c b/xlators/mount/fuse/src/fuse-bridge.c
index 401ff64955e..5131d6c05ba 100644
--- a/xlators/mount/fuse/src/fuse-bridge.c
+++ b/xlators/mount/fuse/src/fuse-bridge.c
@@ -3867,29 +3867,17 @@ int
fuse_get_mount_status (xlator_t *this)
{
int kid_status = -1;
- pid_t kid_pid = -1;
fuse_private_t *priv = this->private;
- int our_status = -1;
if (read(priv->status_pipe[0],&kid_status, sizeof(kid_status)) < 0) {
gf_log (this->name, GF_LOG_ERROR, "could not get mount status");
- goto out;
+ kid_status = -1;
}
gf_log (this->name, GF_LOG_DEBUG, "mount status is %d", kid_status);
- if (read(priv->status_pipe[0],&kid_pid, sizeof(kid_pid)) < 0) {
- gf_log (this->name, GF_LOG_ERROR, "could not get mount PID");
- goto out;
- }
- gf_log (this->name, GF_LOG_DEBUG, "mount PID is %d", kid_pid);
-
- (void)waitpid(kid_pid,NULL,0);
- our_status = kid_status;
-
-out:
close(priv->status_pipe[0]);
close(priv->status_pipe[1]);
- return our_status;
+ return kid_status;
}
static void *
@@ -4372,7 +4360,7 @@ init (xlator_t *this_xl)
int xl_name_allocated = 0;
int fsname_allocated = 0;
glusterfs_ctx_t *ctx = NULL;
- gf_boolean_t sync_mtab = _gf_false;
+ gf_boolean_t sync_to_mount = _gf_false;
char *mnt_args = NULL;
if (this_xl == NULL)
@@ -4520,11 +4508,11 @@ init (xlator_t *this_xl)
priv->fuse_dump_fd = ret;
}
- sync_mtab = _gf_false;
- ret = dict_get_str (options, "sync-mtab", &value_string);
+ sync_to_mount = _gf_false;
+ ret = dict_get_str (options, "sync-to-mount", &value_string);
if (ret == 0) {
ret = gf_string2boolean (value_string,
- &sync_mtab);
+ &sync_to_mount);
GF_ASSERT (ret == 0);
}
@@ -4570,7 +4558,7 @@ init (xlator_t *this_xl)
}
priv->fd = gf_fuse_mount (priv->mount_point, fsname, mnt_args,
- sync_mtab ? &ctx->mtab_pid : NULL,
+ sync_to_mount ? &ctx->mnt_pid : NULL,
priv->status_pipe[1]);
if (priv->fd == -1)
goto cleanup_exit;
@@ -4682,7 +4670,7 @@ struct volume_options options[] = {
{ .key = {"uid-map-root"},
.type = GF_OPTION_TYPE_INT
},
- { .key = {"sync-mtab"},
+ { .key = {"sync-to-mount"},
.type = GF_OPTION_TYPE_BOOL
},
{ .key = {"read-only"},