]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
vfs_ceph_new: Unconditionally use ceph_select_filesystem
authorAnoop C S <anoopcs@samba.org>
Fri, 2 Aug 2024 05:40:28 +0000 (11:10 +0530)
committerAnoop C S <anoopcs@samba.org>
Mon, 5 Aug 2024 16:06:47 +0000 (16:06 +0000)
Currently we don't have an explicit check for the presence of
ceph_select_filesystem() libcephfs API as it is always found to
be present with the minimum ceph version that is supported with
Samba right now. Therefore under this assumption directly call
ceph_select_filesystem() without any #ifdefs. Please note that
this change is already part of vfs_ceph via ef0068cd.

ref: https://gitlab.com/samba-team/samba/-/merge_requests/3715
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15686
Signed-off-by: Anoop C S <anoopcs@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Autobuild-User(master): Anoop C S <anoopcs@samba.org>
Autobuild-Date(master): Mon Aug  5 16:06:47 UTC 2024 on atb-devel-224

source3/modules/vfs_ceph_new.c

index 3c82730f87cc3440aeaa3dcc073fbeabb307c22b..99d4a1fe40749523ae64d10ddab58d9636963682 100644 (file)
@@ -169,23 +169,6 @@ static char *cephmount_get_cookie(TALLOC_CTX * mem_ctx, const int snum)
                               fsname);
 }
 
-static int cephmount_select_fs(struct ceph_mount_info *mnt, const char *fsname)
-{
-       /*
-        * ceph_select_filesystem was added in ceph 'nautilus' (v14).
-        * Earlier versions of libcephfs will lack that API function.
-        * At the time of this writing (Feb 2023) all versions of ceph
-        * supported by ceph upstream have this function.
-        */
-#if defined(HAVE_CEPH_SELECT_FILESYSTEM)
-       DBG_DEBUG("[CEPH] calling: ceph_select_filesystem with %s\n", fsname);
-       return ceph_select_filesystem(mnt, fsname);
-#else
-       DBG_ERR("[CEPH] ceph_select_filesystem not available\n");
-       return -ENOTSUP;
-#endif
-}
-
 static struct ceph_mount_info *cephmount_mount_fs(const int snum)
 {
        int ret;
@@ -235,7 +218,7 @@ static struct ceph_mount_info *cephmount_mount_fs(const int snum)
         * 'pacific'. Permit different shares to access different file systems.
         */
        if (fsname != NULL) {
-               ret = cephmount_select_fs(mnt, fsname);
+               ret = ceph_select_filesystem(mnt, fsname);
                if (ret < 0) {
                        goto err_cm_release;
                }