diff mbox series

[37/40] fstests: always use fail-at-unmount semantics for XFS

Message ID 20241127045403.3665299-38-david@fromorbit.com (mailing list archive)
State New
Headers show
Series fstests: concurrent test execution | expand

Commit Message

Dave Chinner Nov. 27, 2024, 4:52 a.m. UTC
From: Dave Chinner <dchinner@redhat.com>

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>
---
 common/rc | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/common/rc b/common/rc
index 3b4b9a59f..7f4a71bd3 100644
--- a/common/rc
+++ b/common/rc
@@ -410,6 +410,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
@@ -609,6 +610,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()