s3:vfs_fileid: introduce 'fileid:nolock_paths'
authorStefan Metzmacher <metze@samba.org>
Wed, 29 Jun 2022 15:14:22 +0000 (17:14 +0200)
committerRalph Boehme <slow@samba.org>
Tue, 5 Jul 2022 15:09:35 +0000 (15:09 +0000)
commitd0d9732acd3dff2511f5a9c0a80aba372b6255e2
treecba91dfc06a1966028e2b2f422aec6e26670437c
parentc040b811eb2b866184cde18145b4a14f249792c9
s3:vfs_fileid: introduce 'fileid:nolock_paths'

This brings much more flexibility compared to:
- 'fsname_norootdir', 'fsname_norootdir_ext',
  which only allow the nolock behavior for the share root
- 'fileid:nolockinode', which only gets a single inode number,
  and ignores the devide id completely.

You can specify path names, which are relative to the shareroot
or absolute.

These names are only evaluated at SMB_VFS_CONNECT() time,
where they are converted into devide and inode pairs.
It means they are completely ignored if the path doesn't
exist yet, or is replaced by a new inode later.

This allows:

- 'fileid:algorithm = fsname_norootdir'
  to be replaced by:
  'fileid:algorithm = fsname' (the default)
  'fileid:nolock_paths = .'

- 'fileid:algorithm = fsname_norootdir_ext'
  to be replaced by:
  'fileid:algorithm = fsname' (the default)
  'fileid:nolock_paths = .'
  'fileid:nolock_max_slots = 18446744073709551615'

And 'fileid:nolockinode = 1234567' and be replaced by
'fileid:nolock_paths = Very/Contended/Path' or
'fileid:nolock_paths = . Very/Contended/Path1 /data/conteded.dir',
if the share root and two additional inodes should be handled
by the 'nolock' behavior.

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