From: Erik Mouw <mouw@nl.linux.org>
To: Sachin Gaikwad <sachin.kernel@gmail.com>
Cc: Jim Cromie <jim.cromie@gmail.com>,
kernel learner <kernellearner@gmail.com>,
linux-fsdevel@vger.kernel.org, kernelnewbies@nl.linux.org
Subject: Re: Upgrading datastructures between different filesystem versions
Date: Fri, 28 Sep 2007 15:11:00 +0200 [thread overview]
Message-ID: <20070928131100.GA2904@gateway.home> (raw)
In-Reply-To: <f5524d840709261629t6268a050i7483d0229a57cd92@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1324 bytes --]
On Wed, Sep 26, 2007 at 06:29:19PM -0500, Sachin Gaikwad wrote:
> Is it not the case that VFS takes care of all filesystems available ?
> VFS will see if a particular file belongs to ext3 or ext4 and call
> that FS's drivers to access information ??
No, the VFS won't do that. The mount(8) command has been made smart
enough enough to figure out what particular type of filesystem you are
trying to mount by inspecting superblocks.
There are however ways to confuse it: if you reformat an ext3
filesystem to reiserfs (version 3), mounting that filesystem without
"-t reiserfs" will trick mount(8) into mounting it as an ext3
filesystem (which will usually fail). This is because the ext3
superblocks lives at offset 0x400, and the reiserfs superblock at
0x8000. When you format a partition as reiserfs, it will not erase old
ext3 superblocks. Before looking for a reiserfs superblock, mount(8)
first looks for an ext3 superblock. The old ext3 superblock wasn't
erased, but usually most of the other ext3 structures are and so
mount(8) will fail to mount the filesystem. Don't know if this
particular "bug" is still there, but it has bitten me in the past.
Erik
--
They're all fools. Don't worry. Darwin may be slow, but he'll
eventually get them. -- Matthew Lammers in alt.sysadmin.recovery
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2007-09-28 13:11 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-25 15:27 Upgrading datastructures between different filesystem versions kernel learner
2007-09-26 5:40 ` Jim Cromie
2007-09-26 16:17 ` Andreas Dilger
2007-09-26 23:29 ` Sachin Gaikwad
2007-09-27 0:53 ` Theodore Tso
2007-09-28 13:11 ` Erik Mouw [this message]
2007-09-28 13:31 ` Christoph Hellwig
2007-09-28 19:47 ` Theodore Tso
2007-09-29 9:05 ` Christoph Hellwig
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=20070928131100.GA2904@gateway.home \
--to=mouw@nl.linux.org \
--cc=jim.cromie@gmail.com \
--cc=kernellearner@gmail.com \
--cc=kernelnewbies@nl.linux.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=sachin.kernel@gmail.com \
/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;
as well as URLs for NNTP newsgroup(s).