diff options
-rw-r--r-- | doc/glusterfs.8 | 4 | ||||
-rw-r--r-- | doc/mount.glusterfs.8 | 4 | ||||
-rw-r--r-- | glusterfsd/src/glusterfsd.c | 11 |
3 files changed, 10 insertions, 9 deletions
diff --git a/doc/glusterfs.8 b/doc/glusterfs.8 index 520150a55e9..985f30a5865 100644 --- a/doc/glusterfs.8 +++ b/doc/glusterfs.8 @@ -118,8 +118,8 @@ Set fuse module's background queue length to N (the default is 64). \fB\-\-congestion\-threshold=N\fR Set fuse module's congestion threshold to N (the default is 48). .TP -\fB\-\-direct\-io\-mode=BOOL\fR -Enable/Disable the direct-I/O mode in fuse module (the default is enable). +\fB\-\-direct\-io\-mode=BOOL|auto\fR +Specify fuse direct I/O strategy (the default is auto). .TP \fB\-\-dump-fuse=PATH\f\R Dump fuse traffic to PATH diff --git a/doc/mount.glusterfs.8 b/doc/mount.glusterfs.8 index b77d02551ba..6a51fc9aef0 100644 --- a/doc/mount.glusterfs.8 +++ b/doc/mount.glusterfs.8 @@ -92,8 +92,8 @@ Set negative timeout to SECONDS in fuse kernel module [default: 0] Volume name to be used for MOUNT-POINT [default: top most volume in VOLUME-FILE] .TP -\fBdirect\-io\-mode=\fRdisable -Disable direct I/O mode in fuse kernel module +\fBdirect\-io\-mode=\fRBOOL|auto +Specify fuse direct I/O strategy [default: auto] .TP \fBcongestion\-threshold=\fRN Set fuse module's congestion threshold to N [default: 48] 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; |