algorithm. This can be used to deliberately break lock coherency
in a cluster for the root directory of a share.
</para>
+ <para>The <command>fsname_norootdir_ext</command> algorithm
+ generates device ids by hashing the kernel device name, except
+ for the root directory of shares where it will use the hostname
+ algorithm. Additionally it generates an extid based on the
+ process pid. This can be used to deliberately break lock
+ coherency between all smbd processes in the whole cluster for
+ the root directory of a share.
+ </para>
</listitem>
</varlistentry>
return 0;
}
+static uint64_t fileid_extid_mapping_pid(struct fileid_handle_data *data,
+ const SMB_STRUCT_STAT *sbuf)
+{
+ return getpid();
+}
+
static int get_connectpath_ino(struct vfs_handle_struct *handle,
ino_t *ino)
{
data->device_mapping_fn = fileid_device_mapping_fsname;
data->extid_mapping_fn = fileid_extid_mapping_zero;
+ ret = get_connectpath_ino(handle, &data->nolockinode);
+ if (ret != 0) {
+ saved_errno = errno;
+ SMB_VFS_NEXT_DISCONNECT(handle);
+ errno = saved_errno;
+ return -1;
+ }
+ } else if (strcmp("fsname_norootdir_ext", algorithm) == 0) {
+ data->device_mapping_fn = fileid_device_mapping_fsname;
+ data->extid_mapping_fn = fileid_extid_mapping_pid;
+
ret = get_connectpath_ino(handle, &data->nolockinode);
if (ret != 0) {
saved_errno = errno;