]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commitdiff
fstests: always use fail-at-unmount semantics for XFS
authorDave Chinner <dchinner@redhat.com>
Wed, 27 Nov 2024 00:04:14 +0000 (11:04 +1100)
committerZorro Lang <zlang@kernel.org>
Sun, 8 Dec 2024 14:18:43 +0000 (22:18 +0800)
Rather than require every test that tests unmount in failure
conditions have to set up fail-at-unmount semantics for the
underlying filesystem, use these semantics for all test and scratch
device mounts.

This currently only affects XFS filesystems, and helps prevent
unexpected unmount hangs in EIO tests because metadata writes are
configured to try forever by default.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Zorro lang <zlang@redhat.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
common/rc

index 3ab75fc889eedda2a49be824c95b37e084e42082..1b2e4508d7673106f1ddb0016fd54766546fbf80 100644 (file)
--- a/common/rc
+++ b/common/rc
@@ -434,6 +434,7 @@ _try_scratch_mount()
        mount_ret=$?
        [ $mount_ret -ne 0 ] && return $mount_ret
        _idmapped_mount $SCRATCH_DEV $SCRATCH_MNT
+       _prepare_for_eio_shutdown $SCRATCH_DEV
 }
 
 # mount scratch device with given options and _fail if mount fails
@@ -633,6 +634,7 @@ _test_mount()
     mount_ret=$?
     [ $mount_ret -ne 0 ] && return $mount_ret
     _idmapped_mount $TEST_DEV $TEST_DIR
+    _prepare_for_eio_shutdown $TEST_DEV
 }
 
 _test_unmount()