]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commit
xfs: regression test for writes racing with reclaim writeback
authorDarrick J. Wong <djwong@kernel.org>
Wed, 21 Dec 2022 16:57:03 +0000 (08:57 -0800)
committerZorro Lang <zlang@kernel.org>
Sun, 25 Dec 2022 13:25:25 +0000 (21:25 +0800)
commit5f291f3c9a846a14547444d9d71d0cfe5c2f9a71
tree5e47fdb6e447f198610a208cd01786be5d7079c1
parent884daafcd9cc26bd1badfef8dee02e772ae2bee9
xfs: regression test for writes racing with reclaim writeback

This test uses the new write delay debug knobs to set up a slow-moving
write racing with writeback of an unwritten block at the end of the
file range targetted by the slow write.  The test succeeds if the file
does not end up corrupt and if the ftrace log captures a message about
the revalidation occurring.

NOTE: I'm not convinced that madvise actually causes the page to be
removed from the pagecache, which means that this is effectively a
functional test for the invalidation, not a corruption reproducer.
On the other hand, the functional test can be done quickly.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Zorro Lang <zlang@redhat.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
tests/xfs/559 [new file with mode: 0755]
tests/xfs/559.out [new file with mode: 0644]