FSTests Archive mirror
 help / color / mirror / Atom feed
From: Eric Whitney <enwlinux@gmail.com>
To: fstests@vger.kernel.org
Cc: linux-ext4@vger.kernel.org, tytso@mit.edu,
	Eric Whitney <enwlinux@gmail.com>
Subject: [PATCH] generic/459: don't run on non-journaled ext4 file systems
Date: Wed, 24 Jan 2024 14:53:06 -0500	[thread overview]
Message-ID: <20240124195306.1177737-1-enwlinux@gmail.com> (raw)

generic/459 fails when run on an ext4 file system created without a
journal or when its journal has not been loaded at mount time.

The test expects that a file system that it has been unable to freeze
will be automatically remounted read only.  However, the default error
handling policy for ext4 is to continue when possible after errors.

A workaround was added to the test in the past to force ext4 to
perform a read only remount in order to meet the test's expectations.
The touch command was used to create a new file after a freeze failure.
This forces ext4 to start a new journal transaction, where it discovers
the journal has previously aborted due to lack of space, and triggers
special case error handling that results in a read only remount.

The workaround requires a journal.  Since ext4 is behaving as designed,
prevent the test from running if there isn't one.

Signed-off-by: Eric Whitney <enwlinux@gmail.com>
---
 tests/generic/459 | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/tests/generic/459 b/tests/generic/459
index c3f0b2b0..63fbbc9b 100755
--- a/tests/generic/459
+++ b/tests/generic/459
@@ -49,6 +49,11 @@ _require_command "$THIN_CHECK_PROG" thin_check
 _require_freeze
 _require_odirect
 
+# non-journaled ext4 won't remount read only after freeze failure
+if [ "$FSTYP" == "ext4" ]; then
+	_require_metadata_journaling
+fi
+
 vgname=vg_$seq
 lvname=lv_$seq
 poolname=pool_$seq
-- 
2.30.2


             reply	other threads:[~2024-01-24 19:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-24 19:53 Eric Whitney [this message]
2024-02-02 13:15 ` [PATCH] generic/459: don't run on non-journaled ext4 file systems Zorro Lang
2024-02-02 19:06   ` Eric Whitney
2024-02-05 16:32     ` Darrick J. Wong

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=20240124195306.1177737-1-enwlinux@gmail.com \
    --to=enwlinux@gmail.com \
    --cc=fstests@vger.kernel.org \
    --cc=linux-ext4@vger.kernel.org \
    --cc=tytso@mit.edu \
    /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 read-only IMAP folder(s) and NNTP newsgroup(s).