Patchset to add asynchronous open/close to master

Jeremy Allison jra at samba.org
Wed Jun 20 10:50:16 MDT 2012


On Wed, Jun 20, 2012 at 12:50:06PM -0400, David Collier-Brown wrote:
> On 06/20/2012 12:24 PM, Jeremy Allison wrote:
> > . In addition, an idea from a conversation I had with you means I add
> > in O_EXCL into the flags - even if the client did not specify this. I
> > save off the initial flags the client requested. So the open inside
> > the thread can only create a file, never open an existing file. If the
> > open fails with EEXIST, then we know we were raced,
> 
> That's elegant: a classic form of the old (ancient?) use of O_EXCL
> and/or creat, to do something other than create lock files.

Thanks. Credit must go to Volker though, he's the one who
thought of this trick to make the threaded code safe in
this respect (even though it looks like he's having second
thoughts :-).

Jeremy.


More information about the samba-technical mailing list