Whamcloud - gitweb
LU-4072 tests: Decrease load on MDT for ZFS in sanity/24v
[fs/lustre-release.git] / lustre / tests / sanity.sh
index 7d21b74..0478ceb 100644 (file)
@@ -998,6 +998,9 @@ test_24v() {
        [ $PARALLEL == "yes" ] && skip "skip parallel run" && return
        trap simple_cleanup_common EXIT
 
+       # Performance issue on ZFS see LU-4072 (c.f. LU-2887)
+       [ $(facet_fstype $SINGLEMDS) = "zfs" ] && NRFILES=10000
+
        mkdir -p $DIR/$tdir
        createmany -m $DIR/$tdir/$tfile $NRFILES
 
@@ -3127,6 +3130,26 @@ test_39n() { # LU-3832
 }
 run_test 39n "check that O_NOATIME is honored"
 
+test_39o() {
+       TESTDIR=$DIR/$tdir/$tfile
+       [ -e $TESTDIR ] && rm -rf $TESTDIR
+       mkdir -p $TESTDIR
+       cd $TESTDIR
+       links1=2
+       ls
+       mkdir a b
+       ls
+       links2=$(stat -c %h .)
+       [ $(($links1 + 2)) != $links2 ] &&
+               error "wrong links count $(($links1 + 2)) != $links2"
+       rmdir b
+       links3=$(stat -c %h .)
+       [ $(($links1 + 1)) != $links3 ] &&
+               error "wrong links count $links1 != $links3"
+       return 0
+}
+run_test 39o "directory cached attributes updated after create ========"
+
 test_40() {
        dd if=/dev/zero of=$DIR/$tfile bs=4096 count=1
        $RUNAS $OPENFILE -f O_WRONLY:O_TRUNC $DIR/$tfile &&