From a24288c5c9da9137eb1d5d487bc7cd11af01b88b Mon Sep 17 00:00:00 2001 From: Philip Spencer Date: Tue, 7 May 2019 10:19:34 -0400 Subject: mount.glusterfs: make fcache-keep-open option take a value Fixes: bz#1158130 Change-Id: Ifdeaed7c9fbe85f7ce421f7c89cbe7265e45f77c Signed-off-by: Amar Tumballi --- xlators/mount/fuse/utils/mount.glusterfs.in | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) (limited to 'xlators/mount/fuse') diff --git a/xlators/mount/fuse/utils/mount.glusterfs.in b/xlators/mount/fuse/utils/mount.glusterfs.in index 59762169f46..99513b4e8c3 100755 --- a/xlators/mount/fuse/utils/mount.glusterfs.in +++ b/xlators/mount/fuse/utils/mount.glusterfs.in @@ -161,10 +161,6 @@ start_glusterfs () cmd_line=$(echo "$cmd_line --volfile-max-fetch-attempts=$volfile_max_fetch_attempts") fi - if [ -n "$fopen_keep_cache" ]; then - cmd_line=$(echo "$cmd_line --fopen-keep-cache"); - fi - if [ -n "$volfile_check" ]; then cmd_line=$(echo "$cmd_line --volfile-check"); fi @@ -193,7 +189,12 @@ start_glusterfs () cmd_line=$(echo "$cmd_line --global-threading"); fi -#options with values start here +#options with optional values start here + if [ -n "$fopen_keep_cache" ]; then + cmd_line=$(echo "$cmd_line --fopen-keep-cache=$fopen_keep_cache"); + fi + +#options with mandatory values start here if [ -n "$halo_max_latency" ]; then cmd_line=$(echo "$cmd_line --xlator-option \ *replicate*.halo-max-latency=$halo_max_latency"); @@ -602,6 +603,10 @@ with_options() "process-name") process_name=$value ;; + # Values that are optional + "fopen-keep-cache") + fopen_keep_cache="=$value" + ;; x-*) # comments or userspace application-specific options, drop them ;; @@ -629,9 +634,6 @@ without_options() "worm") worm=1 ;; - "fopen-keep-cache") - fopen_keep_cache=1 - ;; "enable-ino32") enable_ino32=1 ;; @@ -676,6 +678,10 @@ without_options() ;; "_netdev") ;; + # Values that are optional + "fopen-keep-cache") + fopen_keep_cache="true" + ;; x-*) # comments or userspace application-specific options, drop them ;; -- cgit