This parameter controls whether Samba supports
level2 (read-only) oplocks on a share.Level2, or read-only oplocks allow Windows NT clients
that have an oplock on a file to downgrade from a read-write oplock
to a read-only oplock once a second client opens the file (instead
of releasing all oplocks on a second open, as in traditional,
exclusive oplocks). This allows all openers of the file that
support level2 oplocks to cache the file for read-ahead only (ie.
they may not cache writes or lock requests) and increases performance
for many accesses of files that are not commonly written (such as
application .EXE files).Once one of the clients which have a read-only oplock
writes to the file all clients are notified (no reply is needed
or waited for) and told to break their oplocks to "none" and
delete any read-ahead caches.It is recommended that this parameter be turned on to
speed access to shared executables.For more discussions on level2 oplocks see the CIFS spec.Currently, if kernel
oplocks are supported then level2 oplocks are
not granted (even if this parameter is set to yes).
Note also, the oplocks
parameter must be set to yes on this share in order for
this parameter to have any effect.oplockskernel oplocksyes