All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Luis Henriques (SUSE)" <luis.henriques@linux.dev>
To: Theodore Ts'o <tytso@mit.edu>, "Darrick J . Wong" <djwong@kernel.org>
Cc: fstests@vger.kernel.org,
	"Luis Henriques (SUSE)" <luis.henriques@linux.dev>
Subject: [PATCH v2] ext4/01{2,9}: fix invalid filesystem option 'journal'
Date: Mon,  1 Apr 2024 10:57:08 +0100	[thread overview]
Message-ID: <20240401095709.12304-1-luis.henriques@linux.dev> (raw)

Creating an ext4 filesystem using '-O journal' will fail with:

    Invalid filesystem option set: journal

Fix it by replacing it by '-O has_journal', which ensures the filesystem
(ext3 or ext4) is created with a journal.  While there, also redirect stderr
and stdout to the full log.

Signed-off-by: Luis Henriques (SUSE) <luis.henriques@linux.dev>
---
changes since v1 (after tytso's review):
- instead of dropping '-O journal', replace it by '-O has_journal'
- redirect std{out,err} to log
- use _scratch_mkfs instead of _scratch_mkfs_ext4

 tests/ext4/012 | 2 +-
 tests/ext4/019 | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/ext4/012 b/tests/ext4/012
index c49e8ef4483b..358874a1caf1 100755
--- a/tests/ext4/012
+++ b/tests/ext4/012
@@ -32,7 +32,7 @@ TESTDIR="${SCRATCH_MNT}/scratchdir"
 TESTFILE="${TESTDIR}/testfile"
 
 echo "+ create scratch fs"
-_scratch_mkfs_ext4 -O journal > /dev/null 2>&1
+_scratch_mkfs -O has_journal >> $seqres.full 2>&1
 
 echo "+ mount fs image"
 _scratch_mount
diff --git a/tests/ext4/019 b/tests/ext4/019
index ab5f50c66b6f..f0514093981b 100755
--- a/tests/ext4/019
+++ b/tests/ext4/019
@@ -32,7 +32,7 @@ TESTDIR="${SCRATCH_MNT}/scratchdir"
 TESTFILE="${TESTDIR}/testfile"
 
 echo "+ create scratch fs"
-_scratch_mkfs_ext4 -O journal > /dev/null 2>&1
+_scratch_mkfs -O has_journal >> $seqres.full 2>&1
 
 echo "+ mount fs image"
 _scratch_mount

             reply	other threads:[~2024-04-01  9:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-01  9:57 Luis Henriques (SUSE) [this message]
2024-04-01 14:55 ` [PATCH v2] ext4/01{2,9}: fix invalid filesystem option 'journal' Darrick J. Wong
2024-04-01 16:56 ` Theodore Ts'o

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=20240401095709.12304-1-luis.henriques@linux.dev \
    --to=luis.henriques@linux.dev \
    --cc=djwong@kernel.org \
    --cc=fstests@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.