* [PATCH v2] ext4/01{2,9}: fix invalid filesystem option 'journal'
@ 2024-04-01 9:57 Luis Henriques (SUSE)
2024-04-01 14:55 ` Darrick J. Wong
2024-04-01 16:56 ` Theodore Ts'o
0 siblings, 2 replies; 3+ messages in thread
From: Luis Henriques (SUSE) @ 2024-04-01 9:57 UTC (permalink / raw)
To: Theodore Ts'o, Darrick J . Wong; +Cc: fstests, Luis Henriques (SUSE)
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2] ext4/01{2,9}: fix invalid filesystem option 'journal'
2024-04-01 9:57 [PATCH v2] ext4/01{2,9}: fix invalid filesystem option 'journal' Luis Henriques (SUSE)
@ 2024-04-01 14:55 ` Darrick J. Wong
2024-04-01 16:56 ` Theodore Ts'o
1 sibling, 0 replies; 3+ messages in thread
From: Darrick J. Wong @ 2024-04-01 14:55 UTC (permalink / raw)
To: Luis Henriques (SUSE); +Cc: Theodore Ts'o, fstests
On Mon, Apr 01, 2024 at 10:57:08AM +0100, Luis Henriques (SUSE) wrote:
> 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>
Looks ok,
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
--D
> ---
> 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
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] ext4/01{2,9}: fix invalid filesystem option 'journal'
2024-04-01 9:57 [PATCH v2] ext4/01{2,9}: fix invalid filesystem option 'journal' Luis Henriques (SUSE)
2024-04-01 14:55 ` Darrick J. Wong
@ 2024-04-01 16:56 ` Theodore Ts'o
1 sibling, 0 replies; 3+ messages in thread
From: Theodore Ts'o @ 2024-04-01 16:56 UTC (permalink / raw)
To: Luis Henriques (SUSE); +Cc: Darrick J . Wong, fstests
On Mon, Apr 01, 2024 at 10:57:08AM +0100, Luis Henriques (SUSE) wrote:
> 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>
Reviewed-by: Theodore Ts'o <tytso@mit.edu>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-04-01 16:56 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-01 9:57 [PATCH v2] ext4/01{2,9}: fix invalid filesystem option 'journal' Luis Henriques (SUSE)
2024-04-01 14:55 ` Darrick J. Wong
2024-04-01 16:56 ` Theodore Ts'o
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox