Batch OpLocks: Are they used much these days ...

Urban Widmark urban at teststation.com
Wed Jan 9 15:00:02 GMT 2002


On Thu, 10 Jan 2002, Richard Sharpe wrote:

> Hi,
> 
> I am doing some work with Samba where I am mapping OpLocks onto a 
> distributed file system with a delegation mechanism for managing caching.
> 
> Batch OpLocks look like they will give me trouble.
> 
> How frequently are they used?

FWIW, the oplock code for smbfs that I am working on getting into the
linux kernel (originally by Charles Loep) uses batch oplocks. I'm not sure
why, but here is my uneducated guess ...

Batch oplocks allow a lot more caching on the client side. smbfs can read
pages into memory and does not have to invalidate them even when the file
is closed, because the batch oplock allows the close to be cached. If the
file is opened again the pages remain valid.

The smbfs code doesn't actually do that, but it could.
Why would anyone want just an exclusive oplock?

/Urban





More information about the samba-technical mailing list