Discussion:
[Dump-devel] [patch] Support for ext4 filesystems under linux.
Gertjan van Wingerde
2009-05-26 19:50:14 UTC
Permalink
Hi,

I've created a patch for dump to properly dump ext4 filesystems under Linux.
It currently only works on Linux as it heavily depends on the ext2fs
library, which is only used on Linux for dumping regular files.

---
Gertjan


http://www.nabble.com/file/p23730083/dump_ext4.diff dump_ext4.diff
--
View this message in context: http://www.nabble.com/-patch--Support-for-ext4-filesystems-under-linux.-tp23730083p23730083.html
Sent from the Dump - Dev mailing list archive at Nabble.com.
Stelian Pop
2009-05-28 21:03:04 UTC
Permalink
Hi Gertjan,
Post by Gertjan van Wingerde
I've created a patch for dump to properly dump ext4 filesystems under Linux.
It currently only works on Linux as it heavily depends on the ext2fs
library, which is only used on Linux for dumping regular files.
First of all, thanks for your patch. I suppose this require a recent
version of ext2fs libs ?

However, I'm a bit puzzled because I thought ext4 was quite different than
ext3, and your patch seems way too simple to make dump work on ext4.

In particular, dump does raw seeks on the underlying disk device and
reads fixed size blocks, and I thought ext4, with its "extent" format,
has changed this. But maybe I'm wrong and the ext2fs library is able
to cope with all the differences.

I have to admit that I (still) haven't had the time to look at ext4 yet,
so I really cannot comment further on the validity of this patch.

So if somebody else here can give this a try it would be great.

Stelian.
--
Stelian Pop <***@popies.net>
Gertjan van Wingerde
2009-05-29 08:04:28 UTC
Permalink
Hi Stelian,
Post by Stelian Pop
Hi Gertjan,
Post by Gertjan van Wingerde
I've created a patch for dump to properly dump ext4 filesystems under Linux.
It currently only works on Linux as it heavily depends on the ext2fs
library, which is only used on Linux for dumping regular files.
First of all, thanks for your patch. I suppose this require a recent
version of ext2fs libs ?
Yes, this requires a recent version of the ext2fs libs. I am not sure
which version is the first version that works, but I've tested it with
the latest version of the ext2fs libs.
Post by Stelian Pop
However, I'm a bit puzzled because I thought ext4 was quite different than
ext3, and your patch seems way too simple to make dump work on ext4.
In particular, dump does raw seeks on the underlying disk device and
reads fixed size blocks, and I thought ext4, with its "extent" format,
has changed this. But maybe I'm wrong and the ext2fs library is able
to cope with all the differences.
Well, as far as I understand it, ext4 has not changed the way the data
blocks has stored. It has only changed the way an inode points to
these data blocks (it has a much more efficient mechanism for keeping
track of which data blocks belong to a file; especially for large
files with many consecutive blocks on disk.

This is where the ext2fs library is helping us, as it can point us
directly to all the data blocks of a file, and takes care of reading
the "meta-data" for an inode that points to those blocks by itself.
This is why the patch (on Linux) no longer takes care of reading the
indirect blocks, double indirect blocks and triple indirect blocks by
itself. This is all done by the ext2fs lib.
Post by Stelian Pop
I have to admit that I (still) haven't had the time to look at ext4 yet,
so I really cannot comment further on the validity of this patch.
So if somebody else here can give this a try it would be great.
Stelian.
---
Gertjan

Loading...