Gentoo Logo
Gentoo Spaceship




Note: Due to technical difficulties, the Archives are currently not up to date. GMANE provides an alternative service for most mailing lists.
c.f. bug 424647
List Archive: gentoo-user
Navigation:
Lists: gentoo-user: < Prev By Thread Next > < Prev By Date Next >
Headers:
To: gentoo-user@g.o
From: Florian Philipp <lists@...>
Subject: Re: Re: RFC : fast copying of a whole directory tree
Date: Tue, 14 Feb 2012 10:05:47 +0100
Am 13.02.2012 16:31, schrieb Grant Edwards:
> On 2012-02-13, Michael Orlitzky <michael@...> wrote:
>> On 02/13/12 05:49, Helmut Jarausch wrote:
>>>
>>> I've written a small Python program which outputs the file names in
>>> i-node order. If this is fed into tar or cpio nearly no seeks are 
>>> required during copying.
>>
>> What makes you think the inodes are sequential on-disk?
> 
> Even if the i-nodes are sequential on-disk, there's no reason to think
> that the data blocks associated with the inodes are in any particular
> order with respect to the i-nodes themselves.

You could probably find the intended order by using debugfs (at least
for ext*). The following command should output the first physical block
of every file:
find /var/db/portage/ -type f -printf 'bmap <%i> 0\n' | sudo debugfs
/dev/mapper/vg-portage

Todo left as an exercise to the reader:
- Clean debugfs output
- Map inodes back to file names (hint: don't use debugfs's 'ncheck')
- sort | cut | xargs cp

Possible further improvement: Sort the files so that the first block of
the next file is close to the last block of the previous file.

Regards,
Florian Philipp

Attachment:
signature.asc (OpenPGP digital signature)
Replies:
Re: Re: RFC : fast copying of a whole directory tree
-- Joerg Schilling
References:
RFC : fast copying of a whole directory tree
-- Helmut Jarausch
Re: RFC : fast copying of a whole directory tree
-- Michael Orlitzky
Re: RFC : fast copying of a whole directory tree
-- Grant Edwards
Navigation:
Lists: gentoo-user: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
Re: Re: RFC : fast copying of a whole directory tree
Next by thread:
Re: Re: RFC : fast copying of a whole directory tree
Previous by date:
eclean-dist error
Next by date:
Re: Re: RFC : fast copying of a whole directory tree


Updated May 04, 2012

Summary: Archive of the gentoo-user mailing list.

Donate to support our development efforts.

Copyright 2001-2013 Gentoo Foundation, Inc. Questions, Comments? Contact us.