mirror of
https://github.com/samba-team/samba.git
synced 2025-01-12 09:18:10 +03:00
s3:vfs_fileid: also imply the generic nolock logic to the legacy 'hostname' algorithm
That way the file_id.extid is consistenly filled for all cases where we deliberately break lock coherency. This will simplify further changes and give administrators more flexibility. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
This commit is contained in:
parent
48403b0ebb
commit
f99b617c0c
@ -51,6 +51,7 @@ struct fileid_handle_data {
|
||||
unsigned num_mount_entries;
|
||||
struct fileid_mount_entry *mount_entries;
|
||||
struct {
|
||||
bool force_all_inodes;
|
||||
bool force_all_dirs;
|
||||
uint64_t extid;
|
||||
size_t num_inodes;
|
||||
@ -277,6 +278,10 @@ static bool fileid_is_nolock_inode(struct fileid_handle_data *data,
|
||||
{
|
||||
size_t i;
|
||||
|
||||
if (data->nolock.force_all_inodes) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (S_ISDIR(sbuf->st_ex_mode) && data->nolock.force_all_dirs) {
|
||||
return true;
|
||||
}
|
||||
@ -502,6 +507,7 @@ static int fileid_connect(struct vfs_handle_struct *handle,
|
||||
data->mapping_fn = fileid_mapping_fsid;
|
||||
} else if (strcmp("hostname", algorithm) == 0) {
|
||||
data->mapping_fn = fileid_mapping_hostname;
|
||||
data->nolock.force_all_inodes = true;
|
||||
} else if (strcmp("fsname_norootdir", algorithm) == 0) {
|
||||
data->mapping_fn = fileid_mapping_fsname;
|
||||
rootdir_nolock = true;
|
||||
|
Loading…
Reference in New Issue
Block a user