Re: Error "fatal: cannot pread pack file: Success"

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

 




On Tue, 27 Feb 2007, Junio C Hamano wrote:

> "Shawn O. Pearce" <spearce@xxxxxxxxxxx> writes:
> >> 
> >> I think the pread() in get_data_from_pack of index-pack is wrong,
> >> it really should be looping until we fill the buffer in case the
> >> OS doesn't fully satisfy our read request the first time.
> 
> The patch looks correct, even if this was not the problem Bill
> is suffering from.

Ack. 

Although I would almost prefer it if we just did it like we do a lot of 
the other cases: call it "xpread()" instead, and have the loop there.

The reason I didn't do that in the first place is that a file access is 
supposed to be fully satisfied anyway, but yeah, NFS with an interruptible 
mount will break that posix guarantee, so the loop is definitely the right 
thing to do.

		Linus
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]