Skip to contentSkip to conversation

ext4/01{2,9}: fix invalid filesystem option 'journal'

PATCH In review Luis Henriques (SUSE) 3 participants 3 messages Apr 1, 2024

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 ext4/01{2,9}: fix invalid filesystem option 'journal'

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.

---
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(-)
tests/ext4/012 +1 -1
index c49e8ef4483b..358874a1caf1 100755
@@ -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
tests/ext4/019 +1 -1
index ab5f50c66b6f..f0514093981b 100755
@@ -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
Reviewed-by on v2 1/1
#1 lore raw
Quoted 9 lines · 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.

Looks ok,

--D

Quoted 37 lines

---
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(-)
tests/ext4/012 +1 -1
index c49e8ef4483b..358874a1caf1 100755
@@ -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
tests/ext4/019 +1 -1
index ab5f50c66b6f..f0514093981b 100755
@@ -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
Reviewed-by on v2 1/1
#2 lore raw
In reply to Luis Henriques (SUSE)
Quoted 9 lines · 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.