From 4741b2682084aaac1179310bd3672fde6f312404 Mon Sep 17 00:00:00 2001 From: Vijay Bellur Date: Sun, 17 Feb 2013 20:29:47 +0530 Subject: 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 Reviewed-on: http://review.gluster.org/4524 Tested-by: Gluster Build System Reviewed-by: Anand Avati --- xlators/mount/fuse/utils/mount.glusterfs.in | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) (limited to 'xlators/mount') diff --git a/xlators/mount/fuse/utils/mount.glusterfs.in b/xlators/mount/fuse/utils/mount.glusterfs.in index f08c90e6b..8fcd0d32b 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 -- cgit