lkml.org 
[lkml]   [2001]   [Nov]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: 2.4.15-pre1: "bogus" message with reiserfs root and other weirdness
On Nov 21, 2001  09:55 +0200, Eric M wrote:
> Machine booted ok and everything seemed to be ok, but i noticed a few
> weird messages in boot messages right before mounting the root-partition:
> FAT: bogus logical sector size 0
> FAT: bogus logical sector size 0

When the kernel is booting, it doesn't know the filesystem type of the
root fs, so it tries to mount the root device using all of the compiled-in
fs drivers, in the order they are listed in fs/Makefile.in.

It appears that the fat driver doesn't even check for a magic when it
starts trying to mount the filesystem, so it proceeds directly to
spewing errors. You get two such messages because it is trying both
msdos and vfat (which both use the fat driver underneath). You don't
see this with ext2 because it tries to mount before vfat/msdos.

This is a minor bug in the fat read_super() method, because when the
kernel is trying to mount the root fs, it passes the "silent" flag
to the filesystem, so it should not print any messages if it is not a
fat filesystem. If this wasn't the case, then you would get spew from
every filesystem it tried.

Note that reiserfs is guilty of this as well, since it prints out:

can't find a reiserfs filesystem on (dev 08:03, block 64, size 4096)

So a patch for that is attached (against 2.4.13, but I didn't see any
changes which would affect it).

This message is never normally seen, because currently reiserfs is
at the end of the search list for filesystems. I will also propose a
patch to move reiserfs earlier in the probe sequence, since it has
a well-defined magic, and is more commonly used than most others. I
only put it where it is to avoid context issues with my tree (which
has ext3 and jbd (an experimental filesystem interface for journal
devices) at the top.

Please feel free to re-submit these to Linus, I will not do so.

Cheers, Andreas
====================== reiserfs-2.4.13-silent.diff =======================
--- linux.orig/fs/reiserfs/super.c Thu Oct 25 03:05:11 2001
+++ linux/fs/reiserfs/super.c Wed Nov 21 11:01:57 2001
@@ -346,7 +356,8 @@
free, SB_FREE_BLOCKS (s));
}

-static int read_super_block (struct super_block * s, int size, int offset)
+static int read_super_block (struct super_block * s, int size, int offset,
+ int silent)
{
struct buffer_head * bh;
struct reiserfs_super_block * rs;
@@ -362,9 +373,10 @@

rs = (struct reiserfs_super_block *)bh->b_data;
if (!is_reiserfs_magic_string (rs)) {
- printk ("read_super_block: "
- "can't find a reiserfs filesystem on (dev %s, block %lu, size %d)\n",
- kdevname(s->s_dev), bh->b_blocknr, size);
+ if (!silent)
+ printk("read_super_block: can't find a reiserfs filesystem on "
+ "(dev %s, block %lu, size %d)\n",
+ kdevname(s->s_dev), bh->b_blocknr, size);
brelse (bh);
return 1;
}
@@ -393,11 +405,11 @@
rs = (struct reiserfs_super_block *)bh->b_data;
if (!is_reiserfs_magic_string (rs) ||
sb_blocksize(rs) != s->s_blocksize) {
- printk ("read_super_block: "
- "can't find a reiserfs filesystem on (dev %s, block %lu, size %d)\n",
- kdevname(s->s_dev), bh->b_blocknr, size);
+ if (!silent)
+ printk("read_super_block: can't find a reiserfs filesystem on "
+ "(dev %s, block %lu, size %d)\n",
+ kdevname(s->s_dev), bh->b_blocknr, size);
brelse (bh);
- printk ("read_super_block: can't find a reiserfs filesystem on dev %s.\n", kdevname(s->s_dev));
return 1;
}
/* must check to be sure we haven't pulled an old format super out
@@ -621,7 +633,7 @@
}

if (blocks) {
- printk("reserfs: resize option for remount only\n");
+ printk("reiserfs: resize option for remount only\n");
return NULL;
}

@@ -634,9 +646,9 @@
}

/* read block (64-th 1k block), which can contain reiserfs super block */
- if (read_super_block (s, size, REISERFS_DISK_OFFSET_IN_BYTES)) {
+ if (read_super_block (s, size, REISERFS_DISK_OFFSET_IN_BYTES, silent)) {
// try old format (undistributed bitmap, super block in 8-th 1k block of a device)
- if (read_super_block (s, size, REISERFS_OLD_DISK_OFFSET_IN_BYTES))
+ if (read_super_block(s, size, REISERFS_OLD_DISK_OFFSET_IN_BYTES,silent))
goto error;
else
old_format = 1;
====================== reiserfs-2.4.13-order.diff =======================
--- linux.orig/fs/Makefile Thu Oct 25 02:02:41 2001
+++ linux/fs/Makefile Wed Nov 21 10:51:11 2001
@@ -26,7 +26,10 @@
subdir-$(CONFIG_EXT2_FS) += ext2
subdir-$(CONFIG_CRAMFS) += cramfs
subdir-$(CONFIG_RAMFS) += ramfs
+subdir-$(CONFIG_REISERFS_FS) += reiserfs
subdir-$(CONFIG_CODA_FS) += coda
subdir-$(CONFIG_MINIX_FS) += minix
subdir-$(CONFIG_FAT_FS) += fat
@@ -60,7 +63,6 @@
subdir-$(CONFIG_AUTOFS_FS) += autofs
subdir-$(CONFIG_AUTOFS4_FS) += autofs4
subdir-$(CONFIG_ADFS_FS) += adfs
-subdir-$(CONFIG_REISERFS_FS) += reiserfs
subdir-$(CONFIG_DEVPTS_FS) += devpts
subdir-$(CONFIG_SUN_OPENPROMFS) += openpromfs

--
Andreas Dilger
http://sourceforge.net/projects/ext2resize/
http://www-mddsp.enel.ucalgary.ca/People/adilger/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:13    [W:0.124 / U:2.680 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site