close() of an flock'd file is not atomic
    John Baldwin 
    jhb at freebsd.org
       
    Thu Jun  7 12:55:34 UTC 2012
    
    
  
On Wednesday, June 06, 2012 2:39:49 pm Konstantin Belousov wrote:
> On Wed, Jun 06, 2012 at 08:17:54AM -0400, John Baldwin wrote:
> > Based on feedback from Konstantin, I have split the vn_open_vnode() changes
> > out into a separate patch.  Once that patch is in the tree I will revisit
> > this and update the actual bug-fix patch.
> > 
> > The vn_open_vnode() patch is at
> > http://www.freebsd.org/~jhb/patches/vn_open_vnode.patch
> > 
> > I tested it by doing a buildworld -j 32 in a loop while NFS exporting the
> > /usr/obj tree to another machine that did a continual find | xargs md5 loop
> > over the /usr/obj tree.  This survived overnight.
> 
> There is #if 0 left in fhopen() which translates ERESTART into EINTR. Is
> it needed ?
Bruce's reply makes me think it is not, so I will remove it.
> Otherwise it looks fine (but still quite hard to read).
I agree the diff is hard to parse.  Hopefully the patched code itself is
easier to read than the previous version.
-- 
John Baldwin
    
    
More information about the freebsd-fs
mailing list