From 0042d902498d2640c0f36b22f4b4c8fee63b24b4 Mon Sep 17 00:00:00 2001 From: Anoop C S Date: Fri, 2 Aug 2024 11:10:28 +0530 Subject: [PATCH] vfs_ceph_new: Unconditionally use ceph_select_filesystem 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 Reviewed-by: Guenther Deschner Autobuild-User(master): Anoop C S Autobuild-Date(master): Mon Aug 5 16:06:47 UTC 2024 on atb-devel-224 (cherry picked from commit de2f76fa47e6e672ce353ea9d3dc4019965c6491) --- source3/modules/vfs_ceph_new.c | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/source3/modules/vfs_ceph_new.c b/source3/modules/vfs_ceph_new.c index 3c82730f87c..99d4a1fe407 100644 --- a/source3/modules/vfs_ceph_new.c +++ b/source3/modules/vfs_ceph_new.c @@ -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; }