s3:vfs_fileid: add 'fileid:nolock_all_dirs = BOOL'
authorStefan Metzmacher <metze@samba.org>
Wed, 29 Jun 2022 15:50:08 +0000 (17:50 +0200)
committerRalph Boehme <slow@samba.org>
Tue, 5 Jul 2022 15:09:35 +0000 (15:09 +0000)
This adds the feature of the 'fsname_nodirs' algorithm,
but provides it for all algorithms, including 'next_module'.

This can be used to deliberately break lock coherency, but
keep the devid/inode pair untouched, e.g.

  vfs objects = fileid
  fileid:algorithm = next_module
  fileid:nolock_all_dirs = yes

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/modules/vfs_fileid.c

index 4f7e2371bd1daef55fb1320f6f6a3c2a70f465c9..c6d25efe97b844106b1693c453540aa3120fc067 100644 (file)
@@ -577,6 +577,10 @@ static int fileid_connect(struct vfs_handle_struct *handle,
                }
        }
 
+       data->nolock.force_all_dirs = lp_parm_bool(SNUM(handle->conn),
+                                                  "fileid", "nolock_all_dirs",
+                                                  data->nolock.force_all_dirs);
+
        max_slots = lp_parm_ulonglong(SNUM(handle->conn),
                                      "fileid", "nolock_max_slots",
                                      max_slots);