Hi Stelian,
On Thu, May 28, 2009 at 11:03 PM, Stelian Pop <st...@po...> wrote:
> Hi Gertjan,
>
> On Tue, May 26, 2009 at 12:50:14PM -0700, Gertjan van Wingerde wrote:
>
>> 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.
> 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.
>
> 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
|