Theodore Ts'o wrote...

> On Tue, Jan 26, 2021 at 12:10:20AM +0100, Christoph Biedl wrote:

> >   EXT4-fs (sdf3): mounted filesystem without journal. Opts: (null)
> > 
> > Expected:
> > 
> >   EXT4-fs (sdf3): mounting ext2 file system using the ext4 subsystem
> 
> That's just a matter of how it was mounted.  If you mount with -t
> ext2, you'll get:
> 
> # mke2fs -t ext2 /tmp/foo.img  2M
> # mount -t ext2 /tmp/foo.img /mnt
> [39916.330690] EXT4-fs (loop0): mounting ext2 file system using the ext4 
> subsystem
> 
> If you mount the same file system with ext4, you'll get:
> 
> # mount -t ext4 /tmp/foo.img /mnt
> 
> [39880.180962] EXT4-fs (loop0): mounted filesystem without journal. Opts: 
> (null). Quota mode: none.

Sorry, I should have provided some details here:

That kernel (in case that matters) has

    # CONFIG_EXT2_FS is not set
    # CONFIG_EXT3_FS is not set
    CONFIG_EXT4_FS=y
    CONFIG_EXT4_USE_FOR_EXT2=y

and when mounting an ext2 this configuration does the right thing™ without
having to provide additional parameters like "-t". I could confirm that
by mounting an even way older ext2 that I found in my archives.

> > Therefore I assume e2fsck, while repairing the damage, by accident
> > enabled some feature bits that made the kernel think it is dealing with
> > an ext4....
> > 
> > As I said, the raw image is destroyed. However I kept the output of
> > "tune2fs -l" (again, from testing), possibly this provides enough hint
> > to investigate?
> 
> You didn't actually include the output of tune2fs -l in your bug
> report.  Given that you named them "broken" and "okay" I assume you
> meant to attach them, but forgot to do so?

Yes, yes, attachments, signature, at least one I always forget.

> That being said, I'm pretty sure e2fsck enabled file system features;
> in general, it doesn't do that, and certainly not with any of the
> features added since the ext4 era.
> 
> My best guess is that I/O errors resulted in garbage getting written
> to the inode table, and e2fsck wasn't clearly the fscrypt inode flag
> when the fscrypt feature flag was not set; that would explain the
> fscrypt kernel error message that you saw.

Yes, and my question here: Is it possible the existence of that bogus
fscrypt feature flag made e2fsck or the kernel think this is an ext4,
and things went downhill from there? That's a situation I'd like to
avoid - since in the (today rare) case the bootloader cannot handle
ext4, this will result in an unbootable system.

And yes, providing "-t ext2" would have alerted. However, since the
CONFIG_EXT4_USE_FOR_EXT2 option always just worked in the past, I got a
bit lazy ...

Regards,

    Christoph
Filesystem volume name:   boot-pontelli
Last mounted on:          /mnt/usbstick
Filesystem UUID:          0398a2d2-b74e-47e2-894f-0877f3f36bc0
Filesystem magic number:  0xEF53
Filesystem revision #:    1 (dynamic)
Filesystem features:      ext_attr resize_inode dir_index filetype inline_data 
sparse_super
Filesystem flags:         signed_directory_hash
Default mount options:    user_xattr acl
Filesystem state:         not clean
Errors behavior:          Continue
Filesystem OS type:       Linux
Inode count:              62496
Block count:              249868
Reserved block count:     12493
Free blocks:              175795
Free inodes:              62327
First block:              1
Block size:               1024
Fragment size:            1024
Reserved GDT blocks:      256
Blocks per group:         8192
Fragments per group:      8192
Inodes per group:         2016
Inode blocks per group:   252
Filesystem created:       Sun May 11 16:14:32 2014
Last mount time:          Mon Jan 25 20:50:04 2021
Last write time:          Mon Jan 25 20:50:04 2021
Mount count:              1
Maximum mount count:      20
Last checked:             Mon Jan 25 20:49:50 2021
Check interval:           15552000 (6 months)
Next check after:         Sat Jul 24 21:49:50 2021
Lifetime writes:          2732 MB
Reserved blocks uid:      0 (user root)
Reserved blocks gid:      0 (group root)
First inode:              11
Inode size:               128
Default directory hash:   half_md4
Directory Hash Seed:      76f2e6b9-fd15-49b3-a118-ef1263a6faed

Filesystem volume name:   boot-pontelli
Last mounted on:          /mnt/boot
Filesystem UUID:          5f5e9ad4-183f-4dae-8045-b3c960a02a66
Filesystem magic number:  0xEF53
Filesystem revision #:    1 (dynamic)
Filesystem features:      ext_attr resize_inode dir_index filetype sparse_super 
large_file
Filesystem flags:         signed_directory_hash
Default mount options:    user_xattr acl
Filesystem state:         not clean
Errors behavior:          Continue
Filesystem OS type:       Linux
Inode count:              62496
Block count:              249868
Reserved block count:     12493
Free blocks:              232103
Free inodes:              62485
First block:              1
Block size:               1024
Fragment size:            1024
Reserved GDT blocks:      256
Blocks per group:         8192
Fragments per group:      8192
Inodes per group:         2016
Inode blocks per group:   504
Filesystem created:       Mon Jan 25 21:03:21 2021
Last mount time:          Mon Jan 25 21:03:37 2021
Last write time:          Mon Jan 25 21:03:37 2021
Mount count:              1
Maximum mount count:      30
Last checked:             Mon Jan 25 21:03:21 2021
Check interval:           15552000 (6 months)
Next check after:         Sat Jul 24 22:03:21 2021
Reserved blocks uid:      0 (user root)
Reserved blocks gid:      0 (group root)
First inode:              11
Inode size:               256
Required extra isize:     32
Desired extra isize:      32
Default directory hash:   half_md4
Directory Hash Seed:      5cabb7bc-0131-49ca-815f-c6944311004c

Attachment: signature.asc
Description: PGP signature

Reply via email to