HP CIFS File Locking Interoperation
12
Chapter 5 CIFS/9000 File Locking
Implementation
CIFS/9000 mirrors the Windows file locking mechanisms, using the CIFS (SMB) protocol to
provide Windows-equivalen t file locking on a UNIX system for Windows clients (homogenous
client access). For Windows client access to files residing on the local UNIX file system,
CIFS/9000 utilizes:
Mandatory Share Mode Locking (Open Mode),
Byte-Range Locking (programmatic),
Opportunistic Locking (Oplocks).
This locking scheme is executed by the CIFS/9000 smbd UNIX process. Every Windows
client connection to the CIFS/9000 server starts an individual smbd daemon that
administers the client access. The smbd daemon implements the Windows file locking
scheme, and interoperates with every other smbd daemon that is running on the local system
to coordinate the file locks that each Windows client requests. The CIFS/9000 smbd
daemons provide the common interface that ensures the validity of each file lock. However,
since the smbd is not executing on the Windows native file server, some client applications
using very strict adherence to programmatic native Windows locking protocol could exhibit
unexpected behavior.
CIFS/9000 configures file locking in the /etc/opt/samba/smb.conf file. Default values do not
need to be explicitly configured in the smb.conf file.
5.1. MANDATORY SHARE MODE LOCKING (OPEN MODE)
– as implemented by CIFS/9000 - uses Windows access modes and share modes.
Access mode:
Read: Read access only
Write: Write access only
Read-Write: Read and Write access
Share mode:
Deny-None: Concurrent read and write access allowed
Deny-All: No concurrent read or write access allowed
Deny-Read: No concurrent read access allowed
Deny-Write: No concurrent write access allowed
The Windows client application determines the access mode when calling Createfile.
CIFS/9000 disables share mode in the smb.conf file on a per -share basis:
[share_name]
share modes = no
The default is “yes”, so the parameter is usually not explicitly set unless it is set to “no”.
However, most applications expect share mode to be set to yes – don’t change it.