mirror of
https://github.com/samba-team/samba.git
synced 2025-02-03 13:47:25 +03:00
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 <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 (cherry picked from commit de2f76fa47e6e672ce353ea9d3dc4019965c6491)
This commit is contained in:
parent
a78c9b0a50
commit
0042d90249
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user