bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Desire enhancement to GNU cpio 2.4.2


From: Dave Dykstra
Subject: Desire enhancement to GNU cpio 2.4.2
Date: Mon, 13 Nov 2000 10:24:56 -0600
User-agent: Mutt/1.2.5i

I have a new GNU/Linux system with large disks on which I need to generate
cpio files for many different systems including older ones that don't
support the "newc" format, only the "odc" format.  The trouble is that I
get "truncating inode number" error messages when I do that.

As far as I can tell, the only reason for including the inode number in a
cpio format file is for determining hard links when it is unpacked.  It
seems to me that it would be trivial to map the real inode numbers in
copyout.c to fake inode numbers that begin with a low number so it would be
unlikely to run over the 65K odc limit.  Code is already present for the
"tar" and "ustar" formats to maintain a hash table of inodes (the functions
add_inode() and find_inode_file()) which could be used when generating the
"odc" format to look up the value chosen for a previously used inode that
appears more than once because of a hard link.  A major optimization would
be to only maintain the hash table for inodes whose nlink > 1 (HINT: that
would apply to the tar/ustar code too, and it doesn't look like it's doing
that).

I would be willing to write & test a patch if I thought it had a decent
chance of making it into the distribution.  A difficulty with that,
however, is that there is not yet a process in my company to assign
copyrights to the FSF, so you might not be able to accept a patch from
me anyway.

Thanks,

- Dave Dykstra
  Bell Labs/Lucent Technologies



reply via email to

[Prev in Thread] Current Thread [Next in Thread]