Skip to contentSkip to conversation

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

PATCH Superseded Luis Henriques (SUSE) 3 participants 4 messages Mar 28, 2024 – Apr 1, 2024

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

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

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

Invalid filesystem option set: journal

I didn't do any archaeological investigation to check if this option ever existed, but the two tests using it will fail to create the scratch filesystems.

---
 tests/ext4/012 | 2 +-
 tests/ext4/019 | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
tests/ext4/012 +1 -1
index c49e8ef4483b..4cef19bf6be5 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_ext4 > /dev/null 2>&1
 
 echo "+ mount fs image"
 _scratch_mount
tests/ext4/019 +1 -1
index ab5f50c66b6f..9db7f23bb608 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_ext4 > /dev/null 2>&1
 
 echo "+ mount fs image"
 _scratch_mount
#1 lore raw
Quoted 9 lines · Luis Henriques (SUSE)

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

Invalid filesystem option set: journal

I didn't do any archaeological investigation to check if this option ever existed, but the two tests using it will fail to create the scratch filesystems.

The feature name has never been journal, but rather has_journal. The reason why no once noticed is because the file system was created by the _require_attrs before the attempted _scratch_mkfs_ext4. So when _scratch_mkfs_ext4 failed, it was a no-op that didn't actually do anything, and there was still a file system the default configuration for the test scenario.

What puzzles me is why there was an attempt to enable the journal feature in the first place. As near as I can tell, the tests don't change what gets tested whether or not the journal is enabled. Darrick; you had added these tests were you were working on ext4's metadata checksum feature; do you remember your thinking at the time?

In any case, either better fix is to replace:

_scratch_mkfs_ext4 -O journal > /dev/null 2>&1

with:

_scratch_mkfs_ext4 -O has_journal >> $seqres.full 2>&1

Or:

_scratch_mkfs -O has_journal >> $seqres.full 2>&1

My preference would be latter, since I'm regularly testing with and without the journal, and I'd much rather run the test with whatever configuration I'm currently testing (e.g., ext4/4k, ext4/1k, ext4/nojournal, ext4/ext3conv, ext4/bigalloc, etc.)

- Ted

#2 lore raw
Quoted 18 lines · Theodore Ts'o
Quoted 9 lines · Luis Henriques (SUSE)

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

Invalid filesystem option set: journal

I didn't do any archaeological investigation to check if this option ever existed, but the two tests using it will fail to create the scratch filesystems.

The feature name has never been journal, but rather has_journal. The reason why no once noticed is because the file system was created by the _require_attrs before the attempted _scratch_mkfs_ext4. So when _scratch_mkfs_ext4 failed, it was a no-op that didn't actually do anything, and there was still a file system the default configuration for the test scenario.

Quoted 5 lines

What puzzles me is why there was an attempt to enable the journal feature in the first place. As near as I can tell, the tests don't change what gets tested whether or not the journal is enabled. Darrick; you had added these tests were you were working on ext4's metadata checksum feature; do you remember your thinking at the time?

"Qwklgjwlqaetwqjetlweqqlgqgqtrrt", most likely.

Quoted 8 lines

In any case, either better fix is to replace:

_scratch_mkfs_ext4 -O journal > /dev/null 2>&1

with:

_scratch_mkfs_ext4 -O has_journal >> $seqres.full 2>&1

Quoted 8 lines

Or:

_scratch_mkfs -O has_journal >> $seqres.full 2>&1

My preference would be latter, since I'm regularly testing with and without the journal, and I'd much rather run the test with whatever configuration I'm currently testing (e.g., ext4/4k, ext4/1k, ext4/nojournal, ext4/ext3conv, ext4/bigalloc, etc.)

I'm ok with either, though _scratch_mkfs -O has_journal is more consistent with the way XFS fuzz tests do things.

Sorry about that. :/

--D

Quoted 3 lines

- Ted

#3 lore raw
Quoted 44 lines · Darrick J. Wong
Quoted 18 lines · Theodore Ts'o
Quoted 9 lines · Luis Henriques (SUSE)

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

Invalid filesystem option set: journal

I didn't do any archaeological investigation to check if this option ever existed, but the two tests using it will fail to create the scratch filesystems.

The feature name has never been journal, but rather has_journal. The reason why no once noticed is because the file system was created by the _require_attrs before the attempted _scratch_mkfs_ext4. So when _scratch_mkfs_ext4 failed, it was a no-op that didn't actually do anything, and there was still a file system the default configuration for the test scenario.

Quoted 5 lines

What puzzles me is why there was an attempt to enable the journal feature in the first place. As near as I can tell, the tests don't change what gets tested whether or not the journal is enabled. Darrick; you had added these tests were you were working on ext4's metadata checksum feature; do you remember your thinking at the time?

"Qwklgjwlqaetwqjetlweqqlgqgqtrrt", most likely.

Quoted 8 lines

In any case, either better fix is to replace:

_scratch_mkfs_ext4 -O journal > /dev/null 2>&1

with:

_scratch_mkfs_ext4 -O has_journal >> $seqres.full 2>&1

Quoted 8 lines

Or:

_scratch_mkfs -O has_journal >> $seqres.full 2>&1

My preference would be latter, since I'm regularly testing with and without the journal, and I'd much rather run the test with whatever configuration I'm currently testing (e.g., ext4/4k, ext4/1k, ext4/nojournal, ext4/ext3conv, ext4/bigalloc, etc.)

Quoted 4 lines

I'm ok with either, though _scratch_mkfs -O has_journal is more consistent with the way XFS fuzz tests do things.

Sorry about that. :/

Thank you both for the feedback. I'll send out v2 shortly.

Cheers,

Signature · 1 line
Luis