]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
vfs_ceph: Retrieve fs capabilties using vfs_get_fs_capabilities
authorAnoop C S <anoopcs@samba.org>
Tue, 17 Sep 2024 18:20:25 +0000 (23:50 +0530)
committerRalph Boehme <slow@samba.org>
Mon, 7 Oct 2024 12:25:30 +0000 (12:25 +0000)
vfs_ceph is supposed to be the last entry when listed with other vfs
modules. This is due to the fact that the connection path is not local
to the server but relative to the virtual remote file system beneath
it. Especially SMB_VFS_FS_CAPABILITIES implementation from vfs_default
is likely to return incorrect results based on the connection path
assumed to be local to the server which might not be the case with
ceph module stacked. Therefore it doesn't make sense to pass through
any vfs interface implementations further down the line to vfs_default.

Instead make use of get_fs_capabilties to start with already known fs
capabilties from connect phase.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15716

Signed-off-by: Anoop C S <anoopcs@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/modules/vfs_ceph.c

index 5a28a93cc82af6929a2cc26b8cdbfa0f80fff0b7..49cbd17692f283b11a577d80d6bdd7fab9fc2638 100644 (file)
@@ -380,10 +380,7 @@ static uint32_t cephwrap_fs_capabilities(
        struct vfs_handle_struct *handle,
        enum timestamp_set_resolution *p_ts_res)
 {
-       uint32_t caps;
-
-       caps = SMB_VFS_NEXT_FS_CAPABILITIES(handle, p_ts_res);
-       *p_ts_res = TIMESTAMP_SET_NT_OR_BETTER;
+       uint32_t caps = vfs_get_fs_capabilities(handle->conn, p_ts_res);
 
        return caps;
 }