fstests.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] generic/361: disable xfs metadata io error retries
@ 2020-06-24  3:52 Darrick J. Wong
  0 siblings, 0 replies; only message in thread
From: Darrick J. Wong @ 2020-06-24  3:52 UTC (permalink / raw)
  To: Eryu Guan; +Cc: fstests

From: Darrick J. Wong <darrick.wong@oracle.com>

This test examines the behavior of xfs when the underlying filesystem is
a sparse image on the scratch filesystem when the scratch fs is about to
run out of space.  Unfortunately, the test assumes that the scratch fs
will ENOSPC on the large data write.  It's possible that metadata
writeback will hit ENOSPC instead, and if we do, the test will hang
forever while xfs retries the write.  Make sure we're set up to fail
fast so that we don't hang the test appliance.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
---
 tests/generic/361 |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/tests/generic/361 b/tests/generic/361
index e28aaf46..403bbe41 100755
--- a/tests/generic/361
+++ b/tests/generic/361
@@ -54,6 +54,11 @@ mkdir -p $fs_mnt
 loop_dev=$(_create_loop_device $fs_img)
 _mkfs_dev $loop_dev
 _mount $loop_dev $fs_mnt
+if [ "$FSTYP" = "xfs" ]; then
+	# Turn off all XFS metadata IO error retries
+	dname=$(_short_dev $loop_dev)
+	echo 0 | tee /sys/fs/xfs/$dname/error/*/*/* > /dev/null
+fi
 $XFS_IO_PROG -fc "pwrite 0 520m" $fs_mnt/testfile >>$seqres.full 2>&1
 
 # remount should not hang

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2020-06-24  3:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-24  3:52 [PATCH] generic/361: disable xfs metadata io error retries Darrick J. Wong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).