Library Table of Contents Index Previous Page (Alt-p) Next Page (Alt-n) Comments

Understanding oplocks

About oplocks  Top

Oplocks (opportunistic locks) enable a CIFS client in certain file-sharing scenarios to perform client-side caching of read-ahead, write-behind, and lock information. A client can then read from or write to a file without regularly reminding the server that it needs access to the file in question. This improves performance by reducing network traffic.

Write cache data loss considerations when using oplocks  Top

Under some circumstances, if a process has an exclusive oplock on a file and a second process attempts to open the file, the first process must invalidate cached data and flush writes and locks. The client must then relinquish the oplock and access to the file. If there is a network failure during this flush, cached write data may be lost.

Data loss possibilities

Any application that has write-cached data can lose that data under the following set of circumstances:

Error handling and write completion

The cache itself does not have any error handling--the applications do. When the application makes a write to the cache, the write is always completed. If the cache, in turn, makes a write to the target system over a network, it must assume that the write is completed because if it does not, the data is lost.

When to turn oplocks off  Top

CIFS oplocks on the filer are on by default.

You might turn CIFS oplocks off under either of the following circumstances:

Otherwise, you can leave CIFS oplocks on.

How filer oplock setting interacts with client oplock setting  Top

You can turn CIFS oplocks on or off at individual clients using a Windows registry setting. Turning CIFS oplocks on at the filer does not override any client-specific settings. Turning CIFS oplocks off at the filer disables all oplocks to or from the filer.

Library Table of Contents Index Previous Page (Alt-p) Next Page (Alt-n) Comments