summaryrefslogtreecommitdiffstats
path: root/xlators/mount/fuse/utils/mount.glusterfs.in
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/mount/fuse/utils/mount.glusterfs.in')
-rwxr-xr-xxlators/mount/fuse/utils/mount.glusterfs.in57
1 files changed, 45 insertions, 12 deletions
diff --git a/xlators/mount/fuse/utils/mount.glusterfs.in b/xlators/mount/fuse/utils/mount.glusterfs.in
index 868a57f7ede..ac4d94cb743 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
@@ -189,7 +185,16 @@ start_glusterfs ()
cmd_line=$(echo "$cmd_line --thin-client");
fi
-#options with values start here
+ if [ -n "$global_threading" ]; then
+ cmd_line=$(echo "$cmd_line --global-threading");
+ fi
+
+#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");
@@ -229,7 +234,7 @@ start_glusterfs ()
cmd_line=$(echo "$cmd_line --reader-thread-count=$reader_thread_count");
fi
- if [ -n "$auto-invalidation" ]; then
+ if [ -n "$fuse_auto_invalidation" ]; then
cmd_line=$(echo "$cmd_line --auto-invalidation=$fuse_auto_invalidation");
fi
@@ -257,6 +262,10 @@ start_glusterfs ()
cmd_line=$(echo "$cmd_line --lru-limit=$lru_limit");
fi
+ if [ -n "$invalidate_limit" ]; then
+ cmd_line=$(echo "$cmd_line --invalidate-limit=$invalidate_limit");
+ fi
+
if [ -n "$bg_qlen" ]; then
cmd_line=$(echo "$cmd_line --background-qlen=$bg_qlen");
fi
@@ -358,10 +367,17 @@ start_glusterfs ()
cmd_line=$(echo "$cmd_line --subdir-mount=/$subdir_mount");
fi
+ if [ -n "$fuse_dev_eperm_ratelimit_ns" ]; then
+ cmd_line=$(echo "$cmd_line --fuse-dev-eperm-ratelimit-ns=$fuse_dev_eperm_ratelimit_ns");
+ fi
+
cmd_line=$(echo "$cmd_line $mount_point");
$cmd_line;
if [ $? -ne 0 ]; then
- warn "Mount failed. Please check the log file for more details."
+ # If this is true, then glusterfs process returned error without
+ # getting daemonized. We have made sure the logs are posted to
+ # 'stderr', so no need to point them to logfile.
+ warn "Mounting glusterfs on $mount_point failed."
exit 1;
fi
@@ -369,7 +385,9 @@ start_glusterfs ()
inode=$( ${getinode} $mount_point 2>/dev/null);
# this is required if the stat returns error
if [ $? -ne 0 ]; then
- warn "Mount failed. Please check the log file for more details."
+ # At this time, glusterfs got daemonized, and then later exited.
+ # These failures are only logged in log file.
+ warn "Mount failed. Check the log file ${log_file} for more details."
umount $mount_point > /dev/null 2>&1;
exit 1;
fi
@@ -500,6 +518,9 @@ with_options()
"lru-limit")
lru_limit=$value
;;
+ "invalidate-limit")
+ invalidate_limit=$value
+ ;;
"background-qlen")
bg_qlen=$value
;;
@@ -562,6 +583,9 @@ with_options()
"fuse-flush-handle-interrupt")
fuse_flush_handle_interrupt=$value
;;
+ "fuse-dev-eperm-ratelimit-ns")
+ fuse_dev_eperm_ratelimit_ns=$value
+ ;;
"context"|"fscontext"|"defcontext"|"rootcontext")
# standard SElinux mount options to pass to the kernel
[ -z "$fuse_mountopts" ] || fuse_mountopts="$fuse_mountopts,"
@@ -579,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
;;
@@ -606,9 +634,6 @@ without_options()
"worm")
worm=1
;;
- "fopen-keep-cache")
- fopen_keep_cache=1
- ;;
"enable-ino32")
enable_ino32=1
;;
@@ -629,6 +654,9 @@ without_options()
# "mount -t glusterfs" sends this, but it's useless.
"rw")
;;
+ "global-threading")
+ global_threading=1
+ ;;
# TODO: not sure how to handle this yet
"async"|"sync"|"dirsync"|\
"mand"|"nomand"|\
@@ -650,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
;;
@@ -731,7 +763,7 @@ main ()
[ -r "$volfile_loc" ] || {
# '%' included to support ipv6 link local addresses
- server_ip=$(echo "$volfile_loc" | sed -n 's/\([a-zA-Z0-9:%.\-]*\):.*/\1/p');
+ server_ip=$(echo "$volfile_loc" | sed -n 's/\([a-zA-Z0-9:%,.\-]*\):.*/\1/p');
volume_str=$(echo "$volfile_loc" | sed -n 's/.*:\([^ ]*\).*/\1/p');
[ -n "$volume_str" ] && {
volume_id=$volume_str
@@ -744,6 +776,7 @@ main ()
[ $(echo $volume_str_temp | grep -c "/") -eq 1 ] &&
[ "$volume_id_temp" != "snaps" ] && {
volume_id=$volume_id_temp;
+ [ ${first_char} = '/' ] && volume_id=/$volume_id;
subdir_mount=$(echo "$volume_str_temp" | cut -f2- -d '/');
}
}