From: Rogier Wolff <R.E.Wolff@BitWizard.nl>
To: Andries Brouwer <Andries.Brouwer@cwi.nl>
Cc: torvalds@osdl.org, akpm@osdl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] don't divide by 0 when trying to mount ext3
Date: Mon, 8 Nov 2004 22:27:11 +0100 [thread overview]
Message-ID: <20041108212711.GA16365@bitwizard.nl> (raw)
In-Reply-To: <20041108195934.GA29981@apps.cwi.nl>
On Mon, Nov 08, 2004 at 08:59:35PM +0100, Andries Brouwer wrote:
> Not surprisingly, the ext3 code crashes in the same way
> the ext2 code does when dividing by zero.
> + if (sb->s_magic != EXT3_SUPER_MAGIC)
> + goto cantfind_ext3;
[...]
> + if (EXT3_INODE_SIZE(sb) == 0)
> + goto cantfind_ext3;
[...]
> + if (EXT3_BLOCKS_PER_GROUP(sb) == 0)
> + goto cantfind_ext3;
[...]
> +cantfind_ext3:
> + if (!silent)
> + printk(KERN_ERR "VFS: Can't find ext3 filesystem on dev %s.\n",
> + sb->s_id);
> + goto failed_mount;
There are now three cases that end up with the same message and
same error from userspace viewpoint. There are many cases where
debugging a problem is helped when it's possible to find out exactly
which test determined that the filesystem could not be mounted.
How about:
[ ... ] {
errstr = "no magic";
goto cantfind_ext3;
}
--
** R.E.Wolff@BitWizard.nl ** http://www.BitWizard.nl/ ** +31-15-2600998 **
*-- BitWizard writes Linux device drivers for any device you may have! --*
Q: It doesn't work. A: Look buddy, doesn't work is an ambiguous statement.
Does it sit on the couch all day? Is it unemployed? Please be specific!
Define 'it' and what it isn't doing. --------- Adapted from lxrbot FAQ
next prev parent reply other threads:[~2004-11-08 21:27 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-08 19:59 [PATCH] don't divide by 0 when trying to mount ext3 Andries Brouwer
2004-11-08 21:27 ` Rogier Wolff [this message]
2004-11-08 21:54 ` Andries Brouwer
2004-11-08 22:10 ` Rogier Wolff
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=20041108212711.GA16365@bitwizard.nl \
--to=r.e.wolff@bitwizard.nl \
--cc=Andries.Brouwer@cwi.nl \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@osdl.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.