is_locked optimization

Nadav Danieli nadavd at exanet.com
Sun Dec 12 16:19:36 GMT 2004


On Sun, 2004-12-12 at 01:24, Jeremy Allison wrote:

> The optimisation is only on read/write, not lock - lock requests still
> get set on the file - so it shouldn't affect this. Until the client
> releases the oplock it's still logically the only thing that can affect
> the file state. To be completely sure and as we know when the oplock
> break request has been sent we can turn this off once the break request
> is sent.


There should not be any problem with level 2 oplocks as they are broken
before any write/lock request is served.
For exclusive oplocks I thought a simple "pure" flag can be added to the
oplock when granted, and cleared if any lock requests sent.
This also cover the case where client sends other requests while in the
process of breaking it's oplock.

Nadav


More information about the samba-technical mailing list