Subject: Re: 2.4.19pre8aa3
From: Andrew Morton <[email-masked]>
To: Andrea Arcangeli <[email-masked]>
Cc: Rik van Riel <[email-masked]>, [email-masked]
Date: Wed, 15 May 2002 20:12:04 -0700

Andrea Arcangeli wrote:
> 
> ...
> That's all, and that's an autodetection bug because ext3 must be always
> tried first, there's no point at all to try to mount with ext2 before
> ext3 (of course unless rootfstype= is specified).

It is *very* common problem for people to think that their root fs is ext3
when in fact it is being mounted as ext2.

It seems that /etc/mtab incorrectly reports ext3, which doesn't help.
The real truth is revealed in /proc/mounts.  (Which has this irritating
"/dev/root" thing in it, btw).

So anything we can do to simplify this problem for people would be
really good.  (It would be good if kernel.org came back, too, so we
can see the patch ;))

And Andreas' idea of "Warning: mounting ext3 as as ext2" will help,
too.

--- 2.4.19-pre8/fs/ext2/super.c~ext2-ext3-warning	Wed May 15 19:36:12 2002
+++ 2.4.19-pre8-akpm/fs/ext2/super.c	Wed May 15 20:11:41 2002
@@ -486,6 +486,9 @@ struct super_block * ext2_read_super (st
 		       bdevname(dev), i);
 		goto failed_mount;
 	}
+	if (EXT2_HAS_COMPAT_FEATURE(sb, EXT3_FEATURE_COMPAT_HAS_JOURNAL))
+		ext2_warning(sb, __FUNCTION__,
+			"mounting ext3 filesystem as ext2\n");
 	sb->s_blocksize_bits =
 		le32_to_cpu(EXT2_SB(sb)->s_es->s_log_block_size) + 10;
 	sb->s_blocksize = 1 << sb->s_blocksize_bits;

-