Whamcloud - gitweb
LU-1943 tests: async IO is enough for sanity/80
authorAlex Zhuravlev <bzzz@whamcloud.com>
Tue, 10 Apr 2012 13:06:22 +0000 (17:06 +0400)
committerOleg Drokin <green@whamcloud.com>
Sun, 7 Oct 2012 06:47:47 +0000 (02:47 -0400)
Port of ORI-620 to the master

it can be hard to write 1MB in a second for some
backends (like ZFS), so relax current synchronous
semantics as this doesn't affect the logic.

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Signed-off-by: Mikhail Pershin <tappro@whamcloud.com>
Change-Id: Ie87815de4a2ae51fc166287d74d43278101fe76b
Reviewed-on: http://review.whamcloud.com/4212
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/tests/sanity.sh

index abc24b3..dc195a4 100644 (file)
@@ -4942,6 +4942,16 @@ test_79() { # bug 12743
 run_test 79 "df report consistency check ======================="
 
 test_80() { # bug 10718
+        # relax strong synchronous semantics for slow backends like ZFS
+        local soc="obdfilter.*.sync_on_lock_cancel"
+        local soc_old=$(do_facet ost1 lctl get_param -n $soc | head -n1)
+        local hosts=
+        if [ "$soc_old" != "never" -a "$FSTYPE" != "ldiskfs" ]; then
+                hosts=$(for host in $(seq -f "ost%g" 1 $OSTCOUNT); do
+                          facet_active_host $host; done | sort -u)
+                do_nodes $hosts lctl set_param $soc=never
+        fi
+
         dd if=/dev/zero of=$DIR/$tfile bs=1M count=1 seek=1M
         sync; sleep 1; sync
         local BEFORE=`date +%s`
@@ -4951,6 +4961,9 @@ test_80() { # bug 10718
         if [ $DIFF -gt 1 ] ; then
                 error "elapsed for 1M@1T = $DIFF"
         fi
+
+        [ -n "$hosts" ] && do_nodes $hosts lctl set_param $soc=$soc_old
+
         true
         rm -f $DIR/$tfile
 }