]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commitdiff
common: turn _filter_xfs_dmesg() into _filter_aiodio_dmesg()
authorIlya Dryomov <idryomov@gmail.com>
Thu, 12 Oct 2017 14:54:03 +0000 (16:54 +0200)
committerEryu Guan <eguan@redhat.com>
Thu, 12 Oct 2017 16:03:30 +0000 (00:03 +0800)
With upstream commit 332391a9935d ("fs: Fix page cache inconsistency
when mixing buffered and AIO DIO"), ext4 (and probably other
non-iomap based filesystems) need a _check_dmesg() whitelist entry
for a new WARN in dio_complete() -- generic/095 and 247 trigger a
dio_complete() splat pretty reliably for me.

Add dio_complete() entry to _filter_xfs_dmesg(), rename it and use
it unconditionally in generic/095, 224, 247 and 446.

[eguan: source common/filter too in generic/446]

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
common/filter
tests/generic/095
tests/generic/224
tests/generic/247
tests/generic/446

index 441ee1a6e490d708076db3e24f5f3eda417e2889..0cb458b0051f9d360ec449841249f88042c6fe6b 100644 (file)
@@ -448,10 +448,10 @@ _filter_filefrag()
              $flags, "\n"'
 }
 
-# xfs generates WARNINGs on purpose when applications mix buffered/mmap IO with
+# We generate WARNINGs on purpose when applications mix buffered/mmap IO with
 # direct IO on the same file. This is a helper for _check_dmesg() to filter out
 # such warnings.
-_filter_xfs_dmesg()
+_filter_aiodio_dmesg()
 {
        local warn1="WARNING:.*fs/xfs/xfs_file\.c:.*xfs_file_dio_aio_write.*"
        local warn2="WARNING:.*fs/xfs/xfs_file\.c:.*xfs_file_dio_aio_read.*"
@@ -461,6 +461,7 @@ _filter_xfs_dmesg()
        local warn6="WARNING:.*fs/xfs/xfs_aops\.c:.*__xfs_get_blocks.*"
        local warn7="WARNING:.*fs/iomap\.c:.*iomap_dio_actor.*"
        local warn8="WARNING:.*fs/iomap\.c:.*iomap_dio_complete.*"
+       local warn9="WARNING:.*fs/direct-io\.c:.*dio_complete.*"
        sed -e "s#$warn1#Intentional warnings in xfs_file_dio_aio_write#" \
            -e "s#$warn2#Intentional warnings in xfs_file_dio_aio_read#" \
            -e "s#$warn3#Intentional warnings in xfs_file_read_iter#" \
@@ -468,7 +469,8 @@ _filter_xfs_dmesg()
            -e "s#$warn5#Intentional warnings in iomap_dio_rw#" \
            -e "s#$warn6#Intentional warnings in __xfs_get_blocks#" \
            -e "s#$warn7#Intentional warnings in iomap_dio_actor#" \
-           -e "s#$warn8#Intentional warnings in iomap_dio_complete#"
+           -e "s#$warn8#Intentional warnings in iomap_dio_complete#" \
+           -e "s#$warn9#Intentional warnings in dio_complete#"
 }
 
 # make sure this script returns success
index 050215d417002cb6ed7882671a8cf3fb2228b666..fd4f13fd0a1b4469bf496037a08d8db42ae7a11e 100755 (executable)
@@ -126,10 +126,7 @@ $FIO_PROG $fio_config >>$seqres.full 2>&1
 # umount before checking dmesg in case umount triggers any WARNING or Oops
 _scratch_unmount
 
-if [ "$FSTYP" == "xfs" ]; then
-       _check_dmesg _filter_xfs_dmesg
-else
-       _check_dmesg
-fi
+_check_dmesg _filter_aiodio_dmesg
+
 status=$?
 exit
index 29b1c05d06df22947bb396f3eda757e49008e926..6b3a81536aa8b00ef0d7a56aaac9e9ac62090d6b 100755 (executable)
@@ -83,13 +83,10 @@ done
 wait
 echo "*** Silence is golden ***"
 
-# unmount and check dmesg, filtering out expected XFS warnings about mixed
+# unmount and check dmesg, filtering out expected warnings about mixed
 # direct and buffered I/O
 _scratch_unmount
-if [ "$FSTYP" == "xfs" ]; then
-       _check_dmesg _filter_xfs_dmesg
-else
-       _check_dmesg
-fi
+_check_dmesg _filter_aiodio_dmesg
+
 status=$?
 exit
index aac7078045ee7691200be0137cbe5919632b98e7..0614100cd7a89a2b7d419ff5c610a8371cb706e1 100755 (executable)
@@ -80,13 +80,10 @@ wait
 
 echo "Silence is golden."
 
-# unmount and check dmesg, filtering out expected XFS warnings about mixed
+# unmount and check dmesg, filtering out expected warnings about mixed
 # mmap/dio
 _test_unmount
-if [ "$FSTYP" == "xfs" ]; then
-       _check_dmesg _filter_xfs_dmesg
-else
-       _check_dmesg
-fi
+_check_dmesg _filter_aiodio_dmesg
+
 status=$?
 exit
index 6a1b69aa2edc65f905f902d61cc8d871d569c1ba..52219dacca26121981507ede838b67dd0e1a6301 100755 (executable)
@@ -42,6 +42,7 @@ _cleanup()
 
 # get standard environment and checks
 . ./common/rc
+. ./common/filter
 
 # real QA test starts here
 _supported_os Linux
@@ -79,13 +80,10 @@ wait $dread_pid > /dev/null 2>&1
 
 echo "Silence is golden"
 
-# check dmesg, filtering out expected XFS warnings about mixed mmap/dio
+# check dmesg, filtering out expected warnings about mixed mmap/dio
 # and umount first in case umount triggers warnings
 _scratch_unmount
-if [ "$FSTYP" == "xfs" ]; then
-       _check_dmesg _filter_xfs_dmesg
-else
-       _check_dmesg
-fi
+_check_dmesg _filter_aiodio_dmesg
+
 status=$?
 exit