Fixed: OpLocks caused the corruptions/slowness (Was: How Samba let us down)

Andrew Bartlett abartlet at
Mon Oct 28 23:19:00 GMT 2002

Chris de Vidal wrote:
> --- jra at wrote:
> > The oplock code in Samba has been *heavily* tested.
> > The one thing we cannot fix is clients ignoring
> > oplock
> > break requests. If you can show a problem occurring
> > when clients are *not* ignoring oplock break
> > requests then
> > it's a Samba logic bug and we'll jump on it asap.
> (Fog lifting) OK, you have a great point here, which
> you made before, but I didn't see.  Neil gave some
> guidelines for seeing if it is the client doing so,
> and I'll submit a bug report if I find it to be so (if
> we even get a change to test it!).  I have a good
> feeling that we won't find it to be a Samba problem.
> Still, wouldn't you welcome documentation advising
> people of potential corruption?  I think we both agree
> that there is no guarantee that everyone's network is
> 100% "on" and the danger of corruption appears to be
> greater when there are large files read and written to
> a record at a time (namely, flat databases).

But with OpLocks (if I understand it correctly) this isn't how it
works.  When an OpLocked database is written, it's written to local RAM,
but when the break is sent, it's written 'all changes at once'. 
Assuming the client doesn't miss the break request, this would be a
burst of traffic.

As a matter of interest, how does NT handle clients ignoring Oplock
breaks?  My worry is that after the break times out, another client
updates the database (already slightly corrupt, due to cached writes)
and that the timed out client eventually (transparently) reconnects and
does it's writes (further corruption, possible lost update of other

Is this anywhere near the mark?

Andrew Bartlett

Andrew Bartlett                                 abartlet at
Manager, Authentication Subsystems, Samba Team  abartlet at
Student Network Administrator, Hawker College   abartlet at

More information about the samba-technical mailing list