Giving a VFS a chance to be told that an oplock break is occurring

Jeremy Allison jra at samba.org
Wed Mar 28 21:12:24 MDT 2012


On Wed, Mar 28, 2012 at 06:12:10PM -0700, Richard Sharpe wrote:
> >
> > However you don't get to select the order in which the
> > handlers are run, so if you require synchronous operation
> > that might be a problem.
> 
> OK, that is great. I don't (think I) care what order they are
> delivered in, just as long as they are delivered before the other
> party opening the file get the go ahead to read/write the file.

You can probably count on that, but it's a bit of a hack.

If the open oplock handler gets called first, it sends
the break request to the client then returns. At that point
your handler is guarenteed to run before the reply from the
client is received.

Problem is that's dependent on the current code. If you
rely on these semantics later changes may break that promise.

Jeremy.


More information about the samba-technical mailing list