This VFS module is part of the samba(7) suite.
Samba uses file_id structs to uniquely identify files for locking purpose. By default the file_id contains the device and inode number returned by the stat() system call. As the file_id is a unique identifier of a file, it must be the same on all nodes in a cluster setup. This module overloads the SMB_VFS_FILE_ID_CREATE() operation and generates the device number based on the configured algorithm (see the "fileid:algorithm" option).
When using the fsname or fsid algorithm a stat() and statfs() call is required for all mounted file systems to generate the file_id. If e.g. an NFS file system is unresponsive such a call might block and the smbd process will become unresponsive. Use the "fileid:fstype deny", "fileid:fstype allow", "fileid:mntdir deny", or "fileid:mntdir allow" options to ignore potentially unresponsive file systems.
fileid:algorithm = ALGORITHM
The fsname algorithm generates device id by hashing the kernel device name.
The fsname_nodirs algorithm generates device id by hashing the kernel device name for files and by hashing the hostname for directories. This can be used to deliberately break lock coherency for directories in a cluster.
The fsid algorithm generates the device id from the f_fsid returned from the statfs() syscall.
The hostname algorithm generates device id by hashing the hostname. This can be used to deliberately break lock coherency in a cluster.
The fsname_norootdir algorithm generates device ids by hashing the kernel device name, except for the root directory of shares where it will use the hostname algorithm. This can be used to deliberately break lock coherency in a cluster for the root directory of a share.
fileid:mapping = ALGORITHM
fileid:fstype deny = LIST
fileid:fstype allow = LIST
fileid:mntdir deny = LIST
fileid:mntdir allow = LIST
Usage of the fileid module with the fsid algorithm:
[global] m[blue]vfs objects = fileidm m[blue]fileid:algorithm = fsidm
The original Samba software and related utilities were created by Andrew Tridgell. Samba is now developed by the Samba Team as an Open Source project similar to the way the Linux kernel is developed.