]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
vfs_ceph_new: do explicit 'ceph_init' call gitlab/master
authorShachar Sharon <ssharon@redhat.com>
Thu, 6 Nov 2025 09:15:43 +0000 (11:15 +0200)
committerGünther Deschner <gd@samba.org>
Sat, 13 Dec 2025 19:40:01 +0000 (19:40 +0000)
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 <ssharon@redhat.com>
Reviewed-by: Xavi Hernandez <xhernandez@redhat.com>
Reviewed-by: Guenther Deschner <gd@samba.org>
Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Sat Dec 13 19:40:01 UTC 2025 on atb-devel-224

source3/modules/vfs_ceph_new.c

index 366d855585c39050d5adf4fbacd9dd78f1e893f3..0c913f3e5b521d2f77cb2731a54d71cacd2ec68e 100644 (file)
@@ -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