summaryrefslogtreecommitdiffstats
path: root/xlators/mount/fuse/utils
diff options
context:
space:
mode:
authorAmar Tumballi <amar@gluster.com>2009-02-26 08:09:25 -0800
committerAnand V. Avati <avati@amp.gluster.com>2009-02-27 16:13:55 +0530
commit8462dd88ad3531837ebfccd17a083467faa40227 (patch)
tree694d75c75bb88bcc67a4f1893330de03be0c4793 /xlators/mount/fuse/utils
parentda9664587d414ba703c46839e3a4831ad3784a19 (diff)
volumefile modification awareness to make sure there are no inconsistencies.
Complete (including feature to properly umount) in my sense. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
Diffstat (limited to 'xlators/mount/fuse/utils')
-rwxr-xr-xxlators/mount/fuse/utils/mount.glusterfs.in9
-rwxr-xr-xxlators/mount/fuse/utils/mount_glusterfs.in12
2 files changed, 19 insertions, 2 deletions
diff --git a/xlators/mount/fuse/utils/mount.glusterfs.in b/xlators/mount/fuse/utils/mount.glusterfs.in
index 481fd265f..58da509f1 100755
--- a/xlators/mount/fuse/utils/mount.glusterfs.in
+++ b/xlators/mount/fuse/utils/mount.glusterfs.in
@@ -66,6 +66,10 @@ start_glusterfs ()
cmd_line=$(echo "$cmd_line --log-file=$log_file");
fi
+ if [ -n "$volfile_check" ]; then
+ cmd_line=$(echo "$cmd_line --volfile-check");
+ fi
+
if [ -n "$direct_io_mode" ]; then
cmd_line=$(echo "$cmd_line --direct-io-mode=$direct_io_mode");
fi
@@ -115,7 +119,9 @@ main ()
volume_name=$(echo "$options" | sed -n 's/.*volume-name=\([^,]*\).*/\1/p');
volume_id=$(echo "$options" | sed -n 's/.*volume-id=\([^,]*\).*/\1/p');
-
+
+ volfile_check=$(echo "$options" | sed -n 's/.*volfile-check=\([^,]*\).*/\1/p');
+
volfile_loc="$1";
[ -r "$volfile_loc" ] || {
@@ -131,6 +137,7 @@ main ()
-e 's/[,]*log-level=[^,]*//' \
-e 's/[,]*volume-name=[^,]*//' \
-e 's/[,]*direct-io-mode=[^,]*//' \
+ -e 's/[,]*volfile-check=[^,]*//' \
-e 's/[,]*transport=[^,]*//' \
-e 's/[,]*volume-id=[^,]*//');
# following line is product of love towards sed
diff --git a/xlators/mount/fuse/utils/mount_glusterfs.in b/xlators/mount/fuse/utils/mount_glusterfs.in
index 1376a8897..b064e1ead 100755
--- a/xlators/mount/fuse/utils/mount_glusterfs.in
+++ b/xlators/mount/fuse/utils/mount_glusterfs.in
@@ -66,8 +66,12 @@ start_glusterfs ()
cmd_line=$(echo "$cmd_line --log-file=$log_file");
fi
+ if [ -n "$volfile_check" ]; then
+ cmd_line=$(echo "$cmd_line --volfile-check");
+ fi
+
if [ -n "$direct_io_mode" ]; then
- cmd_line=$(echo "$cmd_line --direct-io-mode=$direct_io_mode");
+ cmd_line=$(echo "$cmd_line --disable-direct-io-mode");
fi
if [ -z "$volfile_loc" ]; then
@@ -107,6 +111,7 @@ main ()
direct_io_mode=""
volume_name=""
new_fs_options=""
+ volfile_check=""
while getopts o: opt; do
case "$opt" in
@@ -128,6 +133,10 @@ main ()
direct_io_mode=$(echo "$options" | sed -n 's/.*direct-io-mode=\([^,]*\).*/\1/p');
}
+ [ -z $volfile_check ] && {
+ volfile_check=$(echo "$options" | sed -n 's/.*volfile-check=\([^,]*\).*/\1/p');
+ }
+
[ -z $volume_name ] && {
volume_name=$(echo "$options" | sed -n 's/.*volume-name=\([^,]*\).*/\1/p');
}
@@ -139,6 +148,7 @@ main ()
this_option=$(echo "$options" | sed -e 's/[,]*log-file=[^,]*//' \
-e 's/[,]*log-level=[^,]*//' \
-e 's/[,]*volume-name=[^,]*//' \
+ -e 's/[,]*volfile-check=[^,]*//' \
-e 's/[,]*direct-io-mode=[^,]*//' \
-e 's/[,]*transport=[^,]*//' \
-e 's/[,]*volume-id=[^,]*//');