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
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
|
|