[PATCH remotenames] remotenames: use atomictemp when writing files

Matt Mackall mpm at selenic.com
Sat Apr 16 14:34:01 EDT 2016


On Fri, 2016-04-15 at 17:09 +0100, Jun Wu wrote:
> On 04/14/2016 11:34 PM, Sean Farley wrote:
> > 
> > Awesome, queued this.
> FYI. The team had the issue just reported it disappeared after applying the
> patch. Although I'm still unclear about why repo wlock + close syscall don't

The wlock does not lock out other readers, only writers. So a >4k write could be
result in a reader seeing an incomplete file if it calls read() in the middle of
the write(). close() itself has no effect on the state visible on local
filesystems[1]: data becomes visible during the write() call.

[1] But on NFS: http://nfs.sourceforge.net/#faq_a8

-- 
Mathematics is the supreme nostalgia of our time.



More information about the Mercurial-devel mailing list