Subject: Re: gzip and amanda conflict?
To: Mike M. Volokhov <mishka@apk.od.ua>
From: David Laight <david@l8s.co.uk>
List: current-users
Date: 09/19/2005 08:02:59
On Mon, Sep 19, 2005 at 09:54:31AM +0300, Mike M. Volokhov wrote:
>
> AFAIU, there is gzip problem. Some time ago we have had switched out
> from GNU gzip. Right now, please look at the following code fragment
> (in_tot is a total size of bytes to compress):
>
> gz_compress(...)
> {
> off_t in_tot = 0;
> ...
> i = snprintf(outbufp, BUFLEN, "%c%c%c%c%c%c%c%c",
> (int)crc & 0xff,
> (int)(crc >> 8) & 0xff,
> (int)(crc >> 16) & 0xff,
> (int)(crc >> 24) & 0xff,
> (int)in_tot & 0xff,
> (int)(in_tot >> 8) & 0xff,
> (int)(in_tot >> 16) & 0xff,
> (int)(in_tot >> 24) & 0xff);
> ...
> if (in_tot > 0xffffffff)
> maybe_warn("input file size >= 4GB cannot be saved");
> ...
> }
>
> I.e. there are no room for reporting about more than 2^32=4G data.
> Later this also badly affects on "gzip -l" for files with uncompressed
> size more than specified volume. So...
The gzip file format doesn't allow a size >= 2^32 to be saved in the
archive trailer. Files >= 2^32 are saved correctly.
So I suspect the maybe_warn() is flipping the exit status....
David
--
David Laight: david@l8s.co.uk