Whamcloud - gitweb
LU-11131 target: keep reply data bit set on failover
[fs/lustre-release.git] / lustre / tests / sanity-flr.sh
index 19e2b9b..1ac707d 100644 (file)
@@ -64,7 +64,7 @@ stop_osts() {
        done
 
        for idx in "$@"; do
-               wait_osc_import_state client ost$idx DISCONN
+               wait_osc_import_state client ost$idx "\(DISCONN\|IDLE\)"
        done
 }
 
@@ -730,8 +730,6 @@ test_2() {
        $LFS setstripe -E 1M -S 1M -E EOF -c 1 $tf
        $LFS setstripe -E 2M -S 1M -E EOF -c -1 $tf2
 
-       local layout=$($LFS getstripe $tf2 | grep -A 4 lmm_objects)
-
        $LFS mirror extend -N -f $tf2 $tf ||
                error "merging $tf2 into $tf failed"
 
@@ -1199,7 +1197,7 @@ test_36() {
        verify_ost_layout_version $tf
 
        # test case 2
-       local mds_idx=mds$(($($LFS getstripe -M $tf-2) + 1))
+       local mds_idx=mds$(($($LFS getstripe -m $tf-2) + 1))
 
        local delay_sec=10
        do_facet $mds_idx $LCTL set_param fail_val=$delay_sec
@@ -1220,7 +1218,7 @@ test_36() {
        do_facet $mds_idx $LCTL set_param fail_loc=0
 
        # test case 3
-       mds_idx=mds$(($($LFS getstripe -M $tf-3) + 1))
+       mds_idx=mds$(($($LFS getstripe -m $tf-3) + 1))
 
        #define OBD_FAIL_FLR_LV_INC 0x1A02
        do_facet $mds_idx $LCTL set_param fail_loc=0x1A02
@@ -1782,8 +1780,9 @@ test_45() {
        rm -rf $DIR/$tdir
        test_mkdir $DIR/$tdir
 
-       $LFS setstripe -N -E1m -c2 -o0,1 -E2m -Eeof -N -E4m -Eeof \
-               -N -E3m -Eeof -N -E8m -Eeof $file || error "Create $file failed"
+       $LFS setstripe -N -E1m -S1m -c2 -o0,1 -E2m -Eeof -N -E4m -Eeof \
+               -N -E3m -S1m -Eeof -N -E8m -Eeof $file ||
+                       error "Create $file failed"
 
        echo "getstripe --yaml $file"
        $LFS getstripe --yaml $file > $temp || error "getstripe $file failed"
@@ -1821,8 +1820,8 @@ test_46() {
        ########################### 1. PFL file #############################
        echo "  ** 1. PFL file"
        rm -f $file
-       $LFS setstripe -E1m -c2 -o0,1 -E2m -c2 -E3m -o1,0 -E4m -c1 -E-1 $file ||
-               error "1. Create PFL $file failed"
+       $LFS setstripe -E1m -S 1M -c2 -o0,1 -E2m -c2 -E3m -o1,0 -E4m -c1 -E-1 \
+               $file || error "1. Create PFL $file failed"
 
        rm -f $file.copy
        verify_46 $file $file.copy "1. PFL file"
@@ -1838,9 +1837,8 @@ test_46() {
 
        ########################### 3. FLR file #############################
        echo "  ** 3. FLR file"
-       rm -f $file
-       $LFS setstripe -N -E1m -c2 -o0,1 -E4m -c1 -Eeof -N -E16m -Eeof $file ||
-               error "3. Create FLR $file failed"
+       $LFS setstripe -N -E1m -S 1M -c2 -o0,1 -E4m -c1 -Eeof -N -E16m -Eeof \
+               $file || error "3. Create FLR $file failed"
 
        rm -f $file.copy
        verify_46 $file $file.copy "3. FLR file"
@@ -1849,21 +1847,21 @@ test_46() {
        ########################### 4. PFL dir ##############################
        echo "  ** 4. PFL dir"
        test_mkdir $dir
-       $LFS setstripe -E1m -c2 -E2m -c1 -E-1 $dir ||
+       $LFS setstripe -E1m -S 1M -c2 -E2m -c1 -E-1 $dir ||
                error "4. setstripe PFL $dir failed"
 
        test_mkdir $dir.copy
-       verify_46 $dir $dir.copy "3. PFL dir"
+       verify_46 $dir $dir.copy "4. PFL dir"
 
        ########################### 5. plain dir ############################
        echo "  ** 5. plain dir"
-       $LFS setstripe -c2 -i-1 $dir || error "4. setstripe plain $dir failed"
+       $LFS setstripe -c2 -i-1 $dir || error "5. setstripe plain $dir failed"
 
        verify_46 $dir $dir.copy "5. plain dir"
 
        ########################### 6. FLR dir ##############################
        echo "  ** 6. FLR dir"
-       $LFS setstripe -N -E1m -c2 -E2m -c1 -Eeof -N -E4m -Eeof $dir ||
+       $LFS setstripe -N -E1m -S 1M -c2 -E2m -c1 -Eeof -N -E4m -Eeof $dir ||
                error "6. setstripe FLR $dir failed"
 
        verify_46 $dir $dir.copy "6. FLR dir"
@@ -1957,7 +1955,7 @@ test_200() {
        #define OBD_FAIL_FLR_RANDOM_PICK_MIRROR 0x1A03
        $LCTL set_param fail_loc=0x1A03
 
-       local mds_idx=mds$(($($LFS getstripe -M $tf) + 1))
+       local mds_idx=mds$(($($LFS getstripe -m $tf) + 1))
        do_facet $mds_idx $LCTL set_param fail_loc=0x1A03
 
        declare -a pids