From: Shachar Sharon Date: Thu, 6 Nov 2025 09:15:43 +0000 (+0200) Subject: vfs_ceph_new: do explicit 'ceph_init' call X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8a05e17dfeb5ecb8621b11fcc89cbc871d1ab442;p=thirdparty%2Fsamba.git vfs_ceph_new: do explicit 'ceph_init' call Prefer an explicit call to 'ceph_init' for better debug handling in case of failure. Without such call the init is done behind the scenes by libcephfs upon first mount but we don't have have enough visibility in case something went wrong. Signed-off-by: Shachar Sharon Reviewed-by: Xavi Hernandez Reviewed-by: Guenther Deschner Autobuild-User(master): Günther Deschner Autobuild-Date(master): Sat Dec 13 19:40:01 UTC 2025 on atb-devel-224 --- diff --git a/source3/modules/vfs_ceph_new.c b/source3/modules/vfs_ceph_new.c index 366d855585c..0c913f3e5b5 100644 --- a/source3/modules/vfs_ceph_new.c +++ b/source3/modules/vfs_ceph_new.c @@ -321,6 +321,17 @@ static struct ceph_mount_info *cephmount_mount_fs( if (ret < 0) { goto out; } + /* + * do explicit init. note that in proxy mode this is a no-op as + * libcephfs' proxy uses only implicit init upon first mount to reduce + * resource consumption. + */ + ret = config->ceph_init_fn(mnt); + if (ret < 0) { + DBG_DEBUG("[CEPH] ceph_init failed: ret=%d\n", ret); + goto out; + } + /* * select a cephfs file system to use: * In ceph, multiple file system support has been stable since