[comp.os.minix] Bug in Minix 1.5.6 tar

nick_andrew@f602.n713.fido.oz (Nick Andrew) (04/26/90)

        I have noticed a bug in 1.5.6 tar(1); it manifests
itself as follows:

When tarring a large directory tree (over 2.4 Mb), after
some point tar stops reading the files within a directory.
The directory name is printed to stderr, but no files are
added to the tarfile.

To reproduce, do "tar cv - / >/dev/null" and watch the
output. After a while, you'll see a whole heap of "read
directory" messages without any interspersed file messages.

This is not good!

Reply to: nick@ultima.cs.uts.oz.au (Nick Andrew)
--- Zeta
 * Origin: Zeta: Unix, Minix, Xenix support (02) 627-4177 (3:713/602)

overby@plains.UUCP (Glen Overby) (05/03/90)

In article <17759@ultima.cs.uts.oz> nick_andrew@f602.n713.fido.oz (Nick Andrew) writes:
[
	About 1.5.x 'tar'
]
>When tarring a large directory tree (over 2.4 Mb), after
>some point tar stops reading the files within a directory.
>The directory name is printed to stderr, but no files are
>added to the tarfile.

Tar keeps track of every file it writes.  If it happens to run into two (or
more) files with the same inode number, it writes the first one it
encounters, and makes the rest of them hard links to the first file.
It's not the size of the files that counts, it's the number of files.

The problem is that tar keeps track of ALL files it encounters, even if it's
inode reference count is 1.  There was a fix for this posted a while back
that made tar keep track of ONLY files with a reference count of more than
1.  I was able to tar up all of /usr/src with this modification installed.
-- 
		Glen Overby	<overby@plains.nodak.edu>
	uunet!plains!overby (UUCP)  overby@plains (Bitnet)