fstests.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: Eryu Guan <guaneryu@gmail.com>
Cc: fstests@vger.kernel.org
Subject: [PATCH] generic/361: disable xfs metadata io error retries
Date: Tue, 23 Jun 2020 20:52:54 -0700	[thread overview]
Message-ID: <20200624035254.GC7600@magnolia> (raw)

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

                 reply	other threads:[~2020-06-24  3:53 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200624035254.GC7600@magnolia \
    --to=darrick.wong@oracle.com \
    --cc=fstests@vger.kernel.org \
    --cc=guaneryu@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).