bug-tar
[Top][All Lists]
Advanced

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

Re: [Bug-tar] gnu tar: Sparse Bug


From: Paul Eggert
Subject: Re: [Bug-tar] gnu tar: Sparse Bug
Date: 03 Sep 2003 09:51:58 -0700
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3

Andrew Somerville <address@hidden> writes:

> I have come up with modifications that correct the problem. However, the
> changes increase the extraction time significantly for sparse files.

I don't see why the changes should increase extraction time in the
usual case.  In the usual case the output file is truncated just
before tar begins to write it.  Tar can detect this cheaply; in most
cases, without any extra system calls.  Tar needs to write zeros only
in the unusual case.

>         Im not sure if the fix should be standard, or only used with the
> "--block-dev-contents" flag,

Standard, surely.  I don't see the need for a new option.

> It comes to my mind that the bug could show up when
> overwriting files already in place.

Yes, that also needs to be fixed.

> To write the zeros efficiently, I set up an GLOBAL (extern) var in
> common.h, which was a unsigned char pointer,

Make it char *, please.

> then connected it to an array which i filled with zeros (of size
> BLOCKSIZE) in the beginning of main in tar.c, then used that to
> write blocksize (or less) chunks of zero data, with full_write.

Can't you just write zeros using the usual tar buffers?




reply via email to

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