* Upgrading datastructures between different filesystem versions
@ 2007-09-25 15:27 kernel learner
2007-09-26 5:40 ` Jim Cromie
0 siblings, 1 reply; 9+ messages in thread
From: kernel learner @ 2007-09-25 15:27 UTC (permalink / raw)
To: linux-fsdevel; +Cc: kernelnewbies
[-- Attachment #1: Type: text/plain, Size: 372 bytes --]
Hi,
ext3 filesystem has 32-bit block address and ext4 filesystem has 48-bit
block address. If a user installs ext4, how will the file system handle
already existing block with 32 bit values? Can anyone point me to the
correct pointer for this backward compatibility stuff? I searched for it but
cudn't find much info. Is the work still pending on this front?
Thanks,
KL
[-- Attachment #2: Type: text/html, Size: 397 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Upgrading datastructures between different filesystem versions
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
0 siblings, 1 reply; 9+ messages in thread
From: Jim Cromie @ 2007-09-26 5:40 UTC (permalink / raw)
To: kernel learner; +Cc: linux-fsdevel, kernelnewbies
kernel learner wrote:
> Hi,
>
> ext3 filesystem has 32-bit block address and ext4 filesystem has
> 48-bit block address. If a user installs ext4, how will the file
> system handle already existing block with 32 bit values?
Why should it ?
thats what ext3 is for.
your kernel can have both FS's supported, and would use ext3 drivers for
ext3
filesystems its asked to mount.
Id expect ext4 drivers handling ext3 filesystems is a distant, secondary
goal
to getting a fast, reliable, clean 48bit filesystem working.
> Can anyone point me to the correct pointer for this backward
> compatibility stuff? I searched for it but cudn't find much info. Is
> the work still pending on this front?
>
> Thanks,
> KL
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Upgrading datastructures between different filesystem versions
2007-09-26 5:40 ` Jim Cromie
@ 2007-09-26 16:17 ` Andreas Dilger
2007-09-26 23:29 ` Sachin Gaikwad
0 siblings, 1 reply; 9+ messages in thread
From: Andreas Dilger @ 2007-09-26 16:17 UTC (permalink / raw)
To: Jim Cromie; +Cc: kernel learner, linux-fsdevel, kernelnewbies
On Sep 25, 2007 23:40 -0600, Jim Cromie wrote:
> kernel learner wrote:
> >ext3 filesystem has 32-bit block address and ext4 filesystem has
> >48-bit block address. If a user installs ext4, how will the file
> >system handle already existing block with 32 bit values?
>
> Why should it ? thats what ext3 is for.
Bzzt. Wrong answer. The ext4 code will be able to read existing ext3
(and ext2) filesystems just fine. Otherwise there wouldn't be much
of an upgrade path.
> Id expect ext4 drivers handling ext3 filesystems is a distant, secondary
> goal to getting a fast, reliable, clean 48bit filesystem working.
Far from the truth. One of the main goals of ext4 is that it is a drop-in
replacement for ext3. The code is mostly incremental improvements over
ext3, and that IS one of the reasons that it is reliable. We didn't throw
away 10 years of bug fixes in the ext2/ext3 code when adding the ext4
features.
Cheers, Andreas
--
Andreas Dilger
Principal Software Engineer
Cluster File Systems, Inc.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Upgrading datastructures between different filesystem versions
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
0 siblings, 2 replies; 9+ messages in thread
From: Sachin Gaikwad @ 2007-09-26 23:29 UTC (permalink / raw)
To: Jim Cromie, kernel learner, linux-fsdevel, kernelnewbies
On 9/26/07, Andreas Dilger <adilger@clusterfs.com> wrote:
> On Sep 25, 2007 23:40 -0600, Jim Cromie wrote:
> > kernel learner wrote:
> > >ext3 filesystem has 32-bit block address and ext4 filesystem has
> > >48-bit block address. If a user installs ext4, how will the file
> > >system handle already existing block with 32 bit values?
> >
> > Why should it ? thats what ext3 is for.
>
> Bzzt. Wrong answer. The ext4 code will be able to read existing ext3
> (and ext2) filesystems just fine. Otherwise there wouldn't be much
> of an upgrade path.
>
> > Id expect ext4 drivers handling ext3 filesystems is a distant, secondary
> > goal to getting a fast, reliable, clean 48bit filesystem working.
>
> Far from the truth. One of the main goals of ext4 is that it is a drop-in
> replacement for ext3. The code is mostly incremental improvements over
> ext3, and that IS one of the reasons that it is reliable. We didn't throw
> away 10 years of bug fixes in the ext2/ext3 code when adding the ext4
> features.
>
> Cheers, Andreas
> --
> Andreas Dilger
> Principal Software Engineer
> Cluster File Systems, Inc.
>
>
> --
> To unsubscribe from this list: send an email with
> "unsubscribe kernelnewbies" to ecartis@nl.linux.org
> Please read the FAQ at http://kernelnewbies.org/FAQ
>
>
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 ??
Correct me if I am wrong. I am a newbie!
Sachin
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Upgrading datastructures between different filesystem versions
2007-09-26 23:29 ` Sachin Gaikwad
@ 2007-09-27 0:53 ` Theodore Tso
2007-09-28 13:11 ` Erik Mouw
1 sibling, 0 replies; 9+ messages in thread
From: Theodore Tso @ 2007-09-27 0:53 UTC (permalink / raw)
To: Sachin Gaikwad; +Cc: Jim Cromie, kernel learner, linux-fsdevel, kernelnewbies
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, it doesn't quite work that way. You have to mount a particular
partition using a specific filesystem (i.e., ntfs, vfat, ext2, ext3,
ext4, etc.). A partition formatted using ext2 can be mounted using
the ext2, ext3, or ext4 filesystem driver. You can explicitly specify
what filesystem should be used to mount a particuar partition using
the -t option to the mount program, or by specifying a particular
filesystem type in the /etc/fstab file.
- Ted
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Upgrading datastructures between different filesystem versions
2007-09-26 23:29 ` Sachin Gaikwad
2007-09-27 0:53 ` Theodore Tso
@ 2007-09-28 13:11 ` Erik Mouw
2007-09-28 13:31 ` Christoph Hellwig
1 sibling, 1 reply; 9+ messages in thread
From: Erik Mouw @ 2007-09-28 13:11 UTC (permalink / raw)
To: Sachin Gaikwad; +Cc: Jim Cromie, kernel learner, linux-fsdevel, kernelnewbies
[-- 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 --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Upgrading datastructures between different filesystem versions
2007-09-28 13:11 ` Erik Mouw
@ 2007-09-28 13:31 ` Christoph Hellwig
2007-09-28 19:47 ` Theodore Tso
0 siblings, 1 reply; 9+ messages in thread
From: Christoph Hellwig @ 2007-09-28 13:31 UTC (permalink / raw)
To: Erik Mouw
Cc: Sachin Gaikwad, Jim Cromie, kernel learner, linux-fsdevel,
kernelnewbies
On Fri, Sep 28, 2007 at 03:11:00PM +0200, Erik Mouw wrote:
> 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.
This is easy to fix, though. Quoting mkfs.xfs:
/*
* Zero out the beginning of the device, to obliterate any old
* filesystem signatures out there. This should take care of
* swap (somewhere around the page size), jfs (32k),
* ext[2,3] and reiserfs (64k) - and hopefully all else.
*/
buf = libxfs_getbuf(xi.ddev, 0, BTOBB(WHACK_SIZE));
bzero(XFS_BUF_PTR(buf), WHACK_SIZE);
libxfs_writebuf(buf, LIBXFS_EXIT_ON_FAILURE);
libxfs_purgebuf(buf);
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Upgrading datastructures between different filesystem versions
2007-09-28 13:31 ` Christoph Hellwig
@ 2007-09-28 19:47 ` Theodore Tso
2007-09-29 9:05 ` Christoph Hellwig
0 siblings, 1 reply; 9+ messages in thread
From: Theodore Tso @ 2007-09-28 19:47 UTC (permalink / raw)
To: Christoph Hellwig
Cc: Erik Mouw, Sachin Gaikwad, Jim Cromie, kernel learner,
linux-fsdevel, kernelnewbies
On Fri, Sep 28, 2007 at 02:31:46PM +0100, Christoph Hellwig wrote:
> On Fri, Sep 28, 2007 at 03:11:00PM +0200, Erik Mouw wrote:
> > 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.
>
> This is easy to fix, though. Quoting mkfs.xfs:
>
> /*
> * Zero out the beginning of the device, to obliterate any old
> * filesystem signatures out there. This should take care of
> * swap (somewhere around the page size), jfs (32k),
> * ext[2,3] and reiserfs (64k) - and hopefully all else.
> */
> buf = libxfs_getbuf(xi.ddev, 0, BTOBB(WHACK_SIZE));
> bzero(XFS_BUF_PTR(buf), WHACK_SIZE);
> libxfs_writebuf(buf, LIBXFS_EXIT_ON_FAILURE);
> libxfs_purgebuf(buf);
Ext3 does something similar, zapping space at the beginning AND the
end of the partition (because the MD superblocks are at the end).
It's just a misfeature of reiserfs's mkfs that it doesn't do this.
- Ted
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Upgrading datastructures between different filesystem versions
2007-09-28 19:47 ` Theodore Tso
@ 2007-09-29 9:05 ` Christoph Hellwig
0 siblings, 0 replies; 9+ messages in thread
From: Christoph Hellwig @ 2007-09-29 9:05 UTC (permalink / raw)
To: Theodore Tso
Cc: Christoph Hellwig, Erik Mouw, Sachin Gaikwad, Jim Cromie,
kernel learner, linux-fsdevel, kernelnewbies
On Fri, Sep 28, 2007 at 03:47:24PM -0400, Theodore Tso wrote:
> Ext3 does something similar, zapping space at the beginning AND the
> end of the partition (because the MD superblocks are at the end).
> It's just a misfeature of reiserfs's mkfs that it doesn't do this.
mkfs.xfs of course also whipes at the end. I just wanted to show how
easy this is to fix.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2007-09-29 9:06 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2007-09-28 13:31 ` Christoph Hellwig
2007-09-28 19:47 ` Theodore Tso
2007-09-29 9:05 ` Christoph Hellwig
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).