[SCM] Samba Shared Repository - branch master updated

Günther Deschner gd at samba.org
Sat Jan 27 00:02:01 UTC 2024


The branch, master has been updated
       via  6e6d8384f36 vfs_ceph: Use ceph_fdopendir() when available for SMB_VFS_FDOPENDIR
      from  447e131ebf2 smb2_tcon: add "smb3 share cap:{CONTINUOUS AVAILABILITY,SCALE OUT,CLUSTER,ASYMMETRIC}" options

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 6e6d8384f369e2b850921c7b4d54742f501c115c
Author: Anoop C S <anoopcs at samba.org>
Date:   Tue Jan 16 11:47:27 2024 +0530

    vfs_ceph: Use ceph_fdopendir() when available for SMB_VFS_FDOPENDIR
    
    Signed-off-by: Anoop C S <anoopcs at samba.org>
    Reviewed-by: Guenther Deschner <gd at samba.org>
    
    Autobuild-User(master): Günther Deschner <gd at samba.org>
    Autobuild-Date(master): Sat Jan 27 00:01:12 UTC 2024 on atb-devel-224

-----------------------------------------------------------------------

Summary of changes:
 source3/modules/vfs_ceph.c | 8 +++++++-
 source3/wscript            | 3 ++-
 2 files changed, 9 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/modules/vfs_ceph.c b/source3/modules/vfs_ceph.c
index 4387918198e..c9ee5414f03 100644
--- a/source3/modules/vfs_ceph.c
+++ b/source3/modules/vfs_ceph.c
@@ -438,9 +438,15 @@ static DIR *cephwrap_fdopendir(struct vfs_handle_struct *handle,
 {
 	int ret = 0;
 	struct ceph_dir_result *result = NULL;
-	DBG_DEBUG("[CEPH] fdopendir(%p, %p)\n", handle, fsp);
 
+#ifdef HAVE_CEPH_FDOPENDIR
+	int dirfd = fsp_get_io_fd(fsp);
+	DBG_DEBUG("[CEPH] fdopendir(%p, %d)\n", handle, dirfd);
+	ret = ceph_fdopendir(handle->data, dirfd, &result);
+#else
+	DBG_DEBUG("[CEPH] fdopendir(%p, %p)\n", handle, fsp);
 	ret = ceph_opendir(handle->data, fsp->fsp_name->base_name, &result);
+#endif
 	if (ret < 0) {
 		result = NULL;
 		errno = -ret; /* We return result which is NULL in this case */
diff --git a/source3/wscript b/source3/wscript
index b76ced59aa4..83aeb763ec4 100644
--- a/source3/wscript
+++ b/source3/wscript
@@ -1681,7 +1681,8 @@ int main(void) {
                                 headers='cephfs/libcephfs.h')
             conf.DEFINE('HAVE_MANDATORY_CEPH_API', '1')
             for api in ['ceph_mkdirat', 'ceph_openat', 'ceph_unlinkat',
-                        'ceph_symlinkat', 'ceph_readlinkat', 'ceph_statxat']:
+                        'ceph_symlinkat', 'ceph_readlinkat', 'ceph_statxat',
+                        'ceph_fdopendir']:
                 if not conf.CHECK_FUNCS_IN(api, 'cephfs',
                                            headers='cephfs/libcephfs.h'):
                     conf.undefine('HAVE_MANDATORY_CEPH_API')


-- 
Samba Shared Repository



More information about the samba-cvs mailing list