Whamcloud - gitweb
b=23793 MOUNTOPT "-o" cleanup
authorElena Gryaznova <elena.gryaznova@oracle.com>
Thu, 23 Dec 2010 21:23:27 +0000 (00:23 +0300)
committerVitaly Fertman <vitaly.fertman@oracle.com>
Thu, 23 Dec 2010 22:51:50 +0000 (01:51 +0300)
i=Minh.Diep

lustre/tests/cfg/local.sh
lustre/tests/conf-sanity.sh
lustre/tests/test-framework.sh

index 298716a..43db944 100644 (file)
@@ -104,7 +104,7 @@ MGS_MOUNT_OPTS=${MGS_MOUNT_OPTS:-$MDS_MOUNT_OPTS}
 MOUNT=${MOUNT:-/mnt/${FSNAME}}
 MOUNT1=${MOUNT1:-$MOUNT}
 MOUNT2=${MOUNT2:-${MOUNT}2}
-MOUNTOPT=${MOUNTOPT:-"user_xattr,acl,flock"}
+MOUNTOPT=${MOUNTOPT:-"-o user_xattr,acl,flock"}
 DIR=${DIR:-$MOUNT}
 DIR1=${DIR:-$MOUNT1}
 DIR2=${DIR2:-$MOUNT2}
index c852868..b487af2 100644 (file)
@@ -165,12 +165,10 @@ mount_client() {
 }
 
 remount_client() {
-       local SAVEMOUNTOPT=$MOUNTOPT
-       MOUNTOPT="remount,$1"
+       local mountopt="-o remount,$1"
        local MOUNTPATH=$2
        echo "remount '$1' lustre on ${MOUNTPATH}....."
-       zconf_mount `hostname`  $MOUNTPATH  || return 96
-       MOUNTOPT=$SAVEMOUNTOPT
+       zconf_mount `hostname`  $MOUNTPATH "$mountopt"  || return 96
 }
 
 umount_client() {
index 89c76ae..bc8de5c 100644 (file)
@@ -720,13 +720,10 @@ setup_quota(){
 }
 
 zconf_mount() {
-    local OPTIONS
     local client=$1
     local mnt=$2
-    # Only supply -o to mount if we have options
-    if [ -n "$MOUNTOPT" ]; then
-        OPTIONS="-o $MOUNTOPT"
-    fi
+    local OPTIONS=${3:-$MOUNTOPT}
+
     local device=$MGSNID:/$FSNAME
     if [ -z "$mnt" -o -z "$FSNAME" ]; then
         echo Bad zconf mount command: opt=$OPTIONS dev=$device mnt=$mnt
@@ -835,10 +832,6 @@ zconf_mount_clients() {
     local mnt=$2
     local OPTIONS=${3:-$MOUNTOPT}
 
-    # Only supply -o to mount if we have options
-    if [ "$OPTIONS" ]; then
-        OPTIONS="-o $OPTIONS"
-    fi
     local device=$MGSNID:/$FSNAME
     if [ -z "$mnt" -o -z "$FSNAME" ]; then
         echo Bad zconf mount command: opt=$OPTIONS dev=$device mnt=$mnt