Re: [PATCH 08/11] streaming_write_entry(): support files with holes
- From
Nguyen Thai Ngoc Duy <pclouds@gmail.com>
- Date
- May 17, 2011, 01:18 UTC
- Message-ID
- <BANLkTimF4zpNewcwsw=3pkt467p6Psq2Dw@mail.gmail.com>
- In-Reply-To
- <7v62pan207.fsf@alter.siamese.dyndns.org>
On Mon, May 16, 2011 at 9:39 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 10 quoted lines
> Nguyen Thai Ngoc Duy <pclouds@gmail.com> writes: > >> On Mon, May 16, 2011 at 7:30 AM, Junio C Hamano <gitster@pobox.com> wrote: >>> One typical use of a large binary file is to hold a sparse on-disk hash >>> table with a lot of holes. Help preserving the holes with lseek(). >> >> Should that be done only with big enough holes? Random zeros may >> increase the number of syscalls unnecessarily. > > I think that is a valid concern, but doesn't the code do that already?
Ahh I see you only increase kept when the the whole buf is zero. I was looking for an explicit threshold, but it's implicitly the buffer size. Sorry for the noise.
-- Duy