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

Volker Lendecke Volker.Lendecke at SerNet.DE
Wed Mar 28 12:35:56 MDT 2012

On Tue, Mar 27, 2012 at 07:51:09PM -0700, Richard Sharpe wrote:
> > Definitely widen out to samba-technical... I'm CC:ing vl on the
> > reply for his thoughts, I know he's spent more time thinking about
> > async issues in the VFS than I have.
> If you are doing read-ahead or write-behind in a VFS module and an
> oplock break occurs then you need to know about it, it seems to me,
> either to invalidate or flush ...

With the current oplock architecture, isn't it possible also
messaging_register for a MSG_SMB_BREAK_REQUEST with a
different handler? This way you will get the Samba-internal
oplock breaks. You could also very cheaply compare
fsp->oplock_type with a value cached locally in your module.
If that changes, a break has happened.


SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen, mailto:kontakt at

More information about the samba-technical mailing list