From: Andrea Arcangeli <andrea@suse.de>
To: Andrew Morton <akpm@zip.com.au>
Cc: Rik van Riel <riel@conectiva.com.br>, linux-kernel@vger.kernel.org
Subject: Re: 2.4.19pre8aa3
Date: Thu, 16 May 2002 05:23:03 +0200 [thread overview]
Message-ID: <20020516032303.GH1025@dualathlon.random> (raw)
In-Reply-To: <20020515212733.GA1025@dualathlon.random> <Pine.LNX.4.44L.0205151929430.32261-100000@imladris.surriel.com> <20020516020134.GC1025@dualathlon.random> <3CE32384.65C70AA@zip.com.au>
On Wed, May 15, 2002 at 08:12:04PM -0700, Andrew Morton wrote:
> 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 ;))
Here it is, it's short enough that I can post it here too. it falls into
the obviously right category IMHO.
--- 2.4.19pre8aa3/fs/ext3/super.c.~1~ Mon Feb 25 22:05:08 2002
+++ 2.4.19pre8aa3/fs/ext3/super.c Fri May 10 14:09:28 2002
@@ -1736,7 +1736,7 @@
static int __init init_ext3_fs(void)
{
- return register_filesystem(&ext3_fs_type);
+ return register_filesystem_lifo(&ext3_fs_type);
}
static void __exit exit_ext3_fs(void)
--- 2.4.19pre8aa3/fs/super.c.~1~ Thu May 9 23:30:07 2002
+++ 2.4.19pre8aa3/fs/super.c Fri May 10 14:08:29 2002
@@ -89,7 +89,7 @@
* unregistered.
*/
-int register_filesystem(struct file_system_type * fs)
+int __register_filesystem(struct file_system_type * fs, int lifo)
{
int res = 0;
struct file_system_type ** p;
@@ -103,8 +103,14 @@
p = find_filesystem(fs->name);
if (*p)
res = -EBUSY;
- else
- *p = fs;
+ else {
+ if (!lifo)
+ *p = fs;
+ else {
+ fs->next = file_systems;
+ file_systems = fs;
+ }
+ }
write_unlock(&file_systems_lock);
return res;
}
--- 2.4.19pre8aa3/include/linux/fs.h.~1~ Fri May 10 00:46:11 2002
+++ 2.4.19pre8aa3/include/linux/fs.h Fri May 10 14:16:54 2002
@@ -1077,7 +1077,9 @@
__MOD_DEC_USE_COUNT((fops)->owner); \
} while(0)
-extern int register_filesystem(struct file_system_type *);
+extern int __register_filesystem(struct file_system_type *, int);
+#define register_filesystem(fs) __register_filesystem(fs, 0)
+#define register_filesystem_lifo(fs) __register_filesystem(fs, 1)
extern int unregister_filesystem(struct file_system_type *);
extern struct vfsmount *kern_mount(struct file_system_type *);
extern int may_umount(struct vfsmount *);
--- 2.4.19pre8aa3/kernel/ksyms.c.~1~ Thu May 9 23:30:06 2002
+++ 2.4.19pre8aa3/kernel/ksyms.c Fri May 10 14:14:22 2002
@@ -355,7 +355,7 @@
EXPORT_SYMBOL(do_SAK);
/* filesystem registration */
-EXPORT_SYMBOL(register_filesystem);
+EXPORT_SYMBOL(__register_filesystem);
EXPORT_SYMBOL(unregister_filesystem);
EXPORT_SYMBOL(kern_mount);
EXPORT_SYMBOL(__mntput);
> 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;
agreed on this patch too.
Andrea
next prev parent reply other threads:[~2002-05-16 3:23 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-05-15 21:27 2.4.19pre8aa3 Andrea Arcangeli
2002-05-15 21:56 ` 2.4.19pre8aa3 Andreas Dilger
2002-05-16 2:18 ` 2.4.19pre8aa3 Andrea Arcangeli
2002-05-15 22:30 ` 2.4.19pre8aa3 Rik van Riel
2002-05-16 2:01 ` 2.4.19pre8aa3 Andrea Arcangeli
2002-05-16 2:06 ` 2.4.19pre8aa3 Rik van Riel
2002-05-16 2:32 ` 2.4.19pre8aa3 Andrea Arcangeli
2002-05-16 2:42 ` 2.4.19pre8aa3 Rik van Riel
2002-05-16 2:58 ` 2.4.19pre8aa3 Andrea Arcangeli
2002-05-16 8:36 ` 2.4.19pre8aa3 Russell King
2002-05-16 8:59 ` 2.4.19pre8aa3 Russell King
2002-05-16 12:56 ` 2.4.19pre8aa3 Andrea Arcangeli
2002-05-16 9:27 ` 2.4.19pre8aa3 Juan Quintela
2002-05-16 16:07 ` 2.4.19pre8aa3 Andrea Arcangeli
2002-05-16 18:37 ` 2.4.19pre8aa3 Rik van Riel
2002-05-16 18:59 ` 2.4.19pre8aa3 Andrea Arcangeli
2002-05-16 3:12 ` 2.4.19pre8aa3 Andrew Morton
2002-05-16 3:23 ` Andrea Arcangeli [this message]
2002-05-16 19:26 ` 2.4.19pre8aa3 Christoph Hellwig
2002-05-31 20:34 ` 2.4.19pre8aa3 Andrea Arcangeli
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20020516032303.GH1025@dualathlon.random \
--to=andrea@suse.de \
--cc=akpm@zip.com.au \
--cc=linux-kernel@vger.kernel.org \
--cc=riel@conectiva.com.br \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®