Re: Handling racy entries in the v5 format [Re: [GSoC] Designing a faster index format - Progress report week 7]

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

 



Thomas Rast <trast@xxxxxxxxxxxxxxx> writes:

> (Michael, we have adapted it somewhat this since you left IRC.)
>
>   When writing an entry: check whether ce_mtime >= index.mtime.  If so,
>   write out ce_mtime=0.
>
> The index.mtime here is a lower bound on the mtime of the new index,
> obtained e.g. by touching the index and then stat()ing it immediately
> before writing out the changed entries.

Is this even workable?  I found that "open, read a byte, write it
back in place, then stat" was not giving useful timestamp and that
was the reason the original racy-git code chose not to do this.

You may be able to do "open, read a byte, write it back in place,
fsync, close and then stat", but doing so while holding that file
also as a lock feels somewhat dirty...
--
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]