Re: What's cooking in git.git (Apr 2012, #06; Sun, 15)
Hi,
I've been busy and have not had time to look into this yet...
2012/4/19 Johannes Sixt <j.sixt@viscovery.net>:
Show 13 quoted lines
> I don't see any mutual exclusion happening in this chain. Perhaps it is
> not needed, provided that the pread() call in get_data_from_pack is
> atomic. But our git_pread() from compat/pread.c, which we use on Windows,
> is not atomic.
>
> :-(
>
> I don't think that it is possible to make git_pread() atomic because it
> would have to be protected against all file accesses that can modify the
> file position.
>
> Is get_data_from_pack() the only function that accesses the pack data?
> Then we could add some mutual exclusion there.
I believe so. And index-pack only accesses the pack via pread, no other means.
--
Duy