benefit is improved security, but in most cases the additional checks will be redundant to the application checks, and the cost will be reduced performance due to the extra overhead of checking for locks on every read and write.
CIFS/9000 enables strict locking on a
[share_name]
strict locking = yes
The default is “no”.
Blocking locks enables the smbd to recognize a timeout period specified on a LockFileEx call. If a previous lock is encountered by a client attempting a byte range lock, the smbd will wait (block) for the timeout period to expire before failing the lock. If the previous lock is released before the timeout, the smbd will then grant the pending lock. When disabled, the lock request is failed immediately.
CIFS/9000 disables blocking locks on a per
[share_name] blocking locks = no
The default is “yes”.
5.3.OPPORTUNISTIC LOCKING (Oplocks) is implemented by the
CIFS/9000 server on a
Lock caching
CIFS/9000 disables Oplocks on a per
[share_name] oplocks = no
The default is “yes”. The default oplock type is Level1.
CIFS/9000 enables Level2 Oplocks on a per
[share_name]
level2 oplocks = yes
The default is “no”. Oplocks must also be set to “yes” for the Level2 oplock parameter to function.
Oplocks apply to Windows clients only. File sharing issues arise when concurrent file access occurs between Windows clients and UNIX clients,
Windows clients is that a Windows client can request an Oplock from the CIFS/9000 server and be granted the Oplock (thus caching the file locally), but a
14