summaryrefslogtreecommitdiffstats
path: root/glusterfsd/src
diff options
context:
space:
mode:
authorAnand Avati <avati@redhat.com>2013-11-19 23:45:32 -0800
committerAnand Avati <avati@redhat.com>2013-11-20 14:42:29 -0800
commit5e31894fbda74a524e1fe30d26f7ed82a77eb5ff (patch)
tree001a212ea838942c8c0b1cf040c165b2c0468ac5 /glusterfsd/src
parentff7ee1ecd7a5562b79522853c8699f07df7fafc0 (diff)
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 <avati@redhat.com> Reviewed-on: http://review.gluster.org/6308 Reviewed-by: Raghavendra Talur <rtalur@redhat.com> Reviewed-by: Harshavardhana <harsha@harshavardhana.net> Tested-by: Gluster Build System <jenkins@build.gluster.com>
Diffstat (limited to 'glusterfsd/src')
-rw-r--r--glusterfsd/src/glusterfsd.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/glusterfsd/src/glusterfsd.c b/glusterfsd/src/glusterfsd.c
index 3cb8f0f515f..d3234e8bca3 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;