summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVijay Bellur <vbellur@redhat.com>2013-02-17 20:29:47 +0530
committerAnand Avati <avati@redhat.com>2013-02-17 16:58:01 -0800
commit4741b2682084aaac1179310bd3672fde6f312404 (patch)
tree917ef90b0c3adce08e2b1aac182fb25b99260565
parentfc501a57bc595ec1d65fa466cfd7d34f28f2012b (diff)
mount.glusterfs: Introduce mem-accounting as an option
option mem-accounting enables memory accounting for the client process. re-factored to keep options with values and options without values in different sections of mount.glusterfs. Change-Id: I54ebc31a1eae6d7a5ce7b0255cd7df74d37d46c1 BUG: 834465 Signed-off-by: Vijay Bellur <vbellur@redhat.com> Reviewed-on: http://review.gluster.org/4524 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
-rwxr-xr-xxlators/mount/fuse/utils/mount.glusterfs.in26
1 files changed, 17 insertions, 9 deletions
diff --git a/xlators/mount/fuse/utils/mount.glusterfs.in b/xlators/mount/fuse/utils/mount.glusterfs.in
index f08c90e6b8d..8fcd0d32b95 100755
--- a/xlators/mount/fuse/utils/mount.glusterfs.in
+++ b/xlators/mount/fuse/utils/mount.glusterfs.in
@@ -88,10 +88,8 @@ start_glusterfs ()
;;
esac
fi
- if [ -n "$log_level" ]; then
- cmd_line=$(echo "$cmd_line --log-level=$log_level");
- fi
+#options without values start here
if [ -n "$read_only" ]; then
cmd_line=$(echo "$cmd_line --read-only");
fi
@@ -112,14 +110,27 @@ start_glusterfs ()
cmd_line=$(echo "$cmd_line --worm");
fi
- if [ -n "$log_file" ]; then
- cmd_line=$(echo "$cmd_line --log-file=$log_file");
+ 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
+ if [ -n "$mem_accounting" ]; then
+ cmd_line=$(echo "$cmd_line --mem-accounting");
+ fi
+
+#options with values start here
+ if [ -n "$log_level" ]; then
+ cmd_line=$(echo "$cmd_line --log-level=$log_level");
+ fi
+
+ if [ -n "$log_file" ]; then
+ cmd_line=$(echo "$cmd_line --log-file=$log_file");
+ fi
+
if [ -n "$direct_io_mode" ]; then
cmd_line=$(echo "$cmd_line --direct-io-mode=$direct_io_mode");
fi
@@ -144,10 +155,6 @@ start_glusterfs ()
cmd_line=$(echo "$cmd_line --gid-timeout=$gid_timeout");
fi
- if [ -n "$fopen_keep_cache" ]; then
- cmd_line=$(echo "$cmd_line --fopen-keep-cache");
- fi
-
if [ -n "$bg_qlen" ]; then
cmd_line=$(echo "$cmd_line --background-qlen=$bg_qlen");
fi
@@ -331,6 +338,7 @@ main ()
"worm") worm=1 ;;
"fopen-keep-cache") fopen_keep_cache=1 ;;
"enable-ino32") enable_ino32=1 ;;
+ "mem-accounting") mem_accounting=1;;
# "mount -t glusterfs" sends this, but it's useless.
"rw") ;;
# these ones are interpreted during system initialization