|
Note
The EnableOplocks value configures Windows-based servers (including Workstations sharing
files) to allow or deny oplocks on local files.
To force closure of open oplocks on close or program exit, EnableOpLockForceClose must be set to 1.
An illustration of how Level2 oplocks work follows:
-
Station 1 opens the file requesting oplock.
-
Since no other station has the file open, the server grants station 1 exclusive oplock.
-
Station 2 opens the file requesting oplock.
-
Since station 1 has not yet written to the file, the server asks station 1 to break
to Level2 oplock.
-
Station 1 complies by flushing locally buffered lock information to the server.
-
Station 1 informs the server that it has broken to level2 Oplock (alternately,
station 1 could have closed the file).
-
The server responds to station 2's open request, granting it Level2 oplock.
Other stations can likewise open the file and obtain Level2 oplock.
-
Station 2 (or any station that has the file open) sends a write request SMB.
The server returns the write response.
-
The server asks all stations that have the file open to break to none, meaning no
station holds any oplock on the file. Because the workstations can have no cached
writes or locks at this point, they need not respond to the break-to-none advisory;
all they need do is invalidate locally cashed read-ahead data.
|
|