From 5e31894fbda74a524e1fe30d26f7ed82a77eb5ff Mon Sep 17 00:00:00 2001 From: Anand Avati Date: Tue, 19 Nov 2013 23:45:32 -0800 Subject: mount/fuse: handle --gid-timeout=0 properly Fix the bug which was using the timeout value as a flag to indicate if it was set (and hence would fail when timeout=0 would evaluate as False) Change-Id: Ie9a8f28d35603458cdac26c9a4e0343e7eda7344 BUG: 1032438 Signed-off-by: Anand Avati Reviewed-on: http://review.gluster.org/6308 Reviewed-by: Raghavendra Talur Reviewed-by: Harshavardhana Tested-by: Gluster Build System --- glusterfsd/src/glusterfsd.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'glusterfsd/src') diff --git a/glusterfsd/src/glusterfsd.c b/glusterfsd/src/glusterfsd.c index 3cb8f0f51..d3234e8bc 100644 --- a/glusterfsd/src/glusterfsd.c +++ b/glusterfsd/src/glusterfsd.c @@ -408,7 +408,7 @@ set_fuse_mount_options (glusterfs_ctx_t *ctx, dict_t *options) break; } - if (cmd_args->gid_timeout) { + if (cmd_args->gid_timeout_set) { ret = dict_set_int32(options, "gid-timeout", cmd_args->gid_timeout); if (ret < 0) { @@ -1023,8 +1023,10 @@ parse_opts (int key, char *arg, struct argp_state *state) break; case ARGP_GID_TIMEOUT_KEY: - if (!gf_string2int(arg, &cmd_args->gid_timeout)) + if (!gf_string2int(arg, &cmd_args->gid_timeout)) { + cmd_args->gid_timeout_set = _gf_true; break; + } argp_failure(state, -1, 0, "unknown group list timeout %s", arg); break; -- cgit