Bug 109331 - EXT4-fs (sda1): couldn't mount as ext3 due to feature incompatibilities
Summary: EXT4-fs (sda1): couldn't mount as ext3 due to feature incompatibilities
Status: NEW
Alias: None
Product: File System
Classification: Unclassified
Component: ext4 (show other bugs)
Hardware: All Linux
: P3 normal
Assignee: fs_ext4@kernel-bugs.osdl.org
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-12-14 04:26 UTC by KernelBug
Modified: 2020-05-28 04:55 UTC (History)
5 users (show)

See Also:
Kernel Version: 4.3.2
Subsystem:
Regression: No
Bisected commit-id:


Attachments
config-4.3.2 (97.26 KB, application/octet-stream)
2015-12-14 04:26 UTC, KernelBug
Details

Description KernelBug 2015-12-14 04:26:05 UTC
Created attachment 197281 [details]
config-4.3.2

I compiled 4.3.2 and when I was looking over the logs I noticed this message in dmesg;

EXT4-fs (sda1): couldn't mount as ext3 due to feature incompatibilities

I personally don't get this message, as to why the kernel is trying to mount ext4 as ext3? Or at least it's the way the message comes across.

Can't say I've ever seen anything like this before in the kernel logs...

Hmm

I've attached my config
Comment 1 KernelBug 2015-12-14 04:30:38 UTC
This is my fstab;

/dev/sda1        /                ext4        defaults           1 1
#/dev/cdrom      /mnt/cdrom       auto        noauto,owner,ro,comment=x-gvfs-show 0 0
devpts           /dev/pts         devpts      gid=5,mode=620     0 0
proc             /proc            proc        defaults           0 0
tmpfs            /dev/shm         tmpfs       defaults           0 0
Comment 2 KernelBug 2015-12-14 05:02:25 UTC
I do not have CONFIG_EXT4_USE_FOR_EXT23 compiled in the kernel.

After some reading, I'm seeing that the kernel looks for the filesystem, trying them until it finds the one compiled in, hence the message?

From what I've always thought, it's only going to look and see what is compiled in, so I'm still not sure why I'm seeing this message.
Comment 3 Huaitong Han 2015-12-14 16:12:58 UTC
what's the result of executing “file -s /dev/sda1” ? I guess sda1 filesystem is ext3.
Comment 4 KernelBug 2015-12-14 21:19:27 UTC
I'm running Slackware 14.1 x86_64 I formatted during the install as ext4.


file -s /dev/sda1

/dev/sda1: Linux rev 1.0 ext4 filesystem data, UUID=7d75a56d-fa34-48c5-a278-45ede11df261 (needs journal recovery) (extents) (large files) (huge files)

I don't claim to know everything as a Slacker, LOL, so either I forgot, or didn't realize that the kernel is going to try each FS until it finds the one compiled in.

Either way, this message shouldn't be appearing, telling us what we know already, which is of course you can't load ext3 when you have it compiled for ext4, such a pointless message...

Please let's get this fixed or silenced...

thanks
Comment 5 Theodore Tso 2015-12-15 00:51:53 UTC
The kernel's low-level boot path tries each file system --- and the problem is that ext4 doesn't know whether this is part of the boot process mounting the root file system, or the user explicitly trying to mount a file system as ext3.

When we dropped support for ext3 in recent kernels, CONFIG_EXT4_USE_FOR_EXT23 was renamed CONFIG_EXT4_USE_FOR_EXT2 and the ext3 bug-for-bug backwards compatibility support was unconditionally included.   It was just a side effect of how ext3 code was removed from the Linux kernel, and given that most distributions would never explicitly want to remove ext3 support entirely lest it break users' configs (i.e., so very, VERY few people compile kernels with !CONFIG_EXT2_FS, !CONFIG_EXT3_FS, and !CONFIG_EXT4_USE_FOR_EXT23) no one really noticed or cared.

We can "fix" this by either changing CONFIG_EXT4_USE_FOR_EXT2 back to CONFIG_EXT4_USE_FOR_EXT23, which would support !ext2, !ext3compat, ext4, but not allow ext2, !ext3co,pat, or ext4.   Or by adding a new Kconfig for EXT4_USE_FOR_EXT3 that would explicitly turn on/off just the ext3 compatibility code.

Personally, I don't really care enough to implement this, but if someone wants to try their hand at a relatively simple kernel patch, please give it a try.
Comment 6 KernelBug 2015-12-15 06:59:40 UTC
@Theodore Tso ok, well I'm not a coder here so I can't help...

I was just wondering why I was now getting this msg I'd never seen before.



Thanks
Comment 7 Erik Quaeghebeur 2016-04-13 20:35:35 UTC
(In reply to KernelBug from comment #6)
>
> I was just wondering why I was now getting this msg I'd never seen before.

FYI: You can get rid of it by informing the kernel about the root fs type, by adding

  rootfstype=ext4

to the kernel command line.

Note You need to log in before you can comment on or make changes to this bug.