summaryrefslogtreecommitdiffstats
path: root/glusterfsd
diff options
context:
space:
mode:
authorCsaba Henk <csaba@redhat.com>2018-03-14 13:39:26 +0100
committerRaghavendra G <rgowdapp@redhat.com>2018-03-22 04:27:11 +0000
commit5b46d55660807860f7b6711754c700474c0b7d2a (patch)
tree13a4650d3fa31659b92275e7ab587c006894c0a0 /glusterfsd
parent286871f550b9356025f964ca8af85aabf083f01d (diff)
client: make fuse direct I/O strategies explicit
So far the --direct-io-mode option has been presented as of being Boolean valued. That is however not exact, as a third behavior is chosen if the option is not specified. We accept now the "auto" value as an explicit choice for the default heuristics, and indicate in the descriptions of the option (which occur in commandline help and in the gluterfs / mount.glusterfs man pages) that auto is the default. The default heuristics was briefly described in the commandline help. We are getting rid of that, because: - it's not the right place to provide such details; - there is no guarantee of keeping the current heuristics so it might go out of sync with reality; - that is already the case to some degree, because the description did not take into account that the default heuristics varies between platforms (on Mac, it's just "off"), and that xlators can also prescribe direct I/O for the file of their choice (see change I3fe3312cd96baa4eecfe1247ab7255b4f455f049). Change-Id: Ia83479c0c67fe66b7fc2e0e8db5b7792d9f44b28 Signed-off-by: Csaba Henk <csaba@redhat.com>
Diffstat (limited to 'glusterfsd')
-rw-r--r--glusterfsd/src/glusterfsd.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/glusterfsd/src/glusterfsd.c b/glusterfsd/src/glusterfsd.c
index ef06ddfed31..a113e3c479f 100644
--- a/glusterfsd/src/glusterfsd.c
+++ b/glusterfsd/src/glusterfsd.c
@@ -196,10 +196,8 @@ static struct argp_option gf_options[] = {
"Enables thin mount and connects via gfproxyd daemon"},
{0, 0, 0, 0, "Fuse options:"},
- {"direct-io-mode", ARGP_DIRECT_IO_MODE_KEY, "BOOL", OPTION_ARG_OPTIONAL,
- "Use direct I/O mode in fuse kernel module"
- " [default: \"off\" if big writes are supported, else "
- "\"on\" for fds not opened with O_RDONLY]"},
+ {"direct-io-mode", ARGP_DIRECT_IO_MODE_KEY, "BOOL|auto", OPTION_ARG_OPTIONAL,
+ "Specify direct I/O strategy [default: \"auto\"]"},
{"entry-timeout", ARGP_ENTRY_TIMEOUT_KEY, "SECONDS", 0,
"Set entry timeout to SECONDS in fuse kernel module [default: 1]"},
{"negative-timeout", ARGP_NEGATIVE_TIMEOUT_KEY, "SECONDS", 0,
@@ -528,7 +526,7 @@ set_fuse_mount_options (glusterfs_ctx_t *ctx, dict_t *options)
goto err;
}
break;
- case GF_OPTION_DEFERRED: /* default */
+ case GF_OPTION_DEFERRED: /* auto */
default:
gf_msg_debug ("glusterfsd", 0, "fuse direct io type %d",
cmd_args->fuse_direct_io_mode);
@@ -1031,6 +1029,9 @@ parse_opts (int key, char *arg, struct argp_state *state)
break;
}
+ if (strcmp (arg, "auto") == 0)
+ break;
+
argp_failure (state, -1, 0,
"unknown direct I/O mode setting \"%s\"", arg);
break;