The branch, v4-22-test has been updated
       via  7c7373f2fd8 vfs_ceph_new: use vfs_ceph_iget/vfs_ceph_iput in 
vfs_ceph_disk_free
       via  252edf3fb2e mdssvc: make a copy of the elasticsearch:default_fields
      from  34b3aec0ea4 VERSION: Bump version up to Samba 4.22.8...

https://git.samba.org/?p=samba.git;a=shortlog;h=v4-22-test


- Log -----------------------------------------------------------------
commit 7c7373f2fd89e9142a31a3b408a9b73b10140ed8
Author: Shweta Sodani <[email protected]>
Date:   Thu Nov 20 16:14:26 2025 +0530

    vfs_ceph_new: use vfs_ceph_iget/vfs_ceph_iput in vfs_ceph_disk_free
    
    Currently inode of root is using to report stats that works fine for share 
of root volume.
    But for subvolume share it reports incorrect information. Hence choose the 
inode based on path,
    so that it will report stats information correctly.
    
    Bug:https://bugzilla.samba.org/show_bug.cgi?id=15954
    
    Signed-off-by: Shweta Sodani <[email protected]>
    Reviewed-by: Xavi Hernandez <[email protected]>
    Reviewed-by: Anoop C S <[email protected]>
    Reviewed-by: Guenther Deschner <[email protected]>
    
    Autobuild-User(master): Günther Deschner <[email protected]>
    Autobuild-Date(master): Mon Nov 24 18:03:08 UTC 2025 on atb-devel-224
    
    (cherry picked from commit f2ccf020046bc4f0465dfa8b5a8737b018fa66ac)
    
    Autobuild-User(v4-22-test): Björn Jacke <[email protected]>
    Autobuild-Date(v4-22-test): Wed Jan 14 13:04:41 UTC 2026 on atb-devel-224

commit 252edf3fb2ec3b5efeb41fbe048f3446ab31ef94
Author: Ralph Boehme <[email protected]>
Date:   Fri Nov 21 11:12:13 2025 +0100

    mdssvc: make a copy of the elasticsearch:default_fields
    
    lp_parm_const_string() returns a pointer to loadparm state that is not 
stable
    across loadparm reloads and hence may later point at random garbage.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=15959
    
    Signed-off-by: Ralph Boehme <[email protected]>
    Reviewed-by: Volker Lendecke <[email protected]>
    
    Autobuild-User(master): Volker Lendecke <[email protected]>
    Autobuild-Date(master): Tue Dec 16 18:58:07 UTC 2025 on atb-devel-224
    
    (cherry picked from commit 5f8125665cb2ccad12678f95d20cae09922b3767)

-----------------------------------------------------------------------

Summary of changes:
 source3/modules/vfs_ceph_new.c        | 17 ++++++++---------
 source3/rpc_server/mdssvc/mdssvc_es.c | 10 ++++++----
 2 files changed, 14 insertions(+), 13 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/modules/vfs_ceph_new.c b/source3/modules/vfs_ceph_new.c
index 45dbeed33be..5aafe7b0ac1 100644
--- a/source3/modules/vfs_ceph_new.c
+++ b/source3/modules/vfs_ceph_new.c
@@ -864,13 +864,14 @@ static int vfs_ceph_ll_statfs(const struct 
vfs_handle_struct *handle,
                              struct statvfs *stbuf)
 {
        struct vfs_ceph_config *config = NULL;
+       int ret = -1;
 
        SMB_VFS_HANDLE_GET_DATA(handle, config, struct vfs_ceph_config,
                                return -ENOMEM);
 
-       DBG_DEBUG("[CEPH] ceph_ll_statfs: ino=%" PRIu64 "\n", iref->ino);
-
-       return config->ceph_ll_statfs_fn(config->mount, iref->inode, stbuf);
+       ret = config->ceph_ll_statfs_fn(config->mount, iref->inode, stbuf);
+       DBG_DEBUG("[CEPH] ceph_ll_statfs: ino=%" PRIu64 " ret=%d\n", iref->ino, 
ret);
+       return ret;
 }
 
 static int vfs_ceph_ll_getattr2(const struct vfs_handle_struct *handle,
@@ -1986,23 +1987,21 @@ static uint64_t vfs_ceph_disk_free(struct 
vfs_handle_struct *handle,
                                uint64_t *dsize)
 {
        struct statvfs statvfs_buf = { 0 };
-       struct Inode *inode = NULL;
        int ret;
        struct vfs_ceph_config *config = NULL;
+       struct vfs_ceph_iref iref = {0};
 
        SMB_VFS_HANDLE_GET_DATA(handle, config, struct vfs_ceph_config,
                                return -ENOMEM);
 
-       ret = config->ceph_ll_lookup_root_fn(config->mount, &inode);
+       ret = vfs_ceph_iget(handle, smb_fname->base_name, 0, &iref);
        if (ret != 0) {
-               DBG_DEBUG("[CEPH] ceph_ll_lookup_root returned %d\n", ret);
                errno = -ret;
                return (uint64_t)(-1);
        }
-       ret = config->ceph_ll_statfs_fn(config->mount, inode, &statvfs_buf);
-       config->ceph_ll_put_fn(config->mount, inode);
+       ret = vfs_ceph_ll_statfs(handle, &iref, &statvfs_buf);
+       vfs_ceph_iput(handle, &iref);
        if (ret != 0) {
-               DBG_DEBUG("[CEPH] ceph_ll_statfs returned %d\n", ret);
                errno = -ret;
                return (uint64_t)(-1);
        }
diff --git a/source3/rpc_server/mdssvc/mdssvc_es.c 
b/source3/rpc_server/mdssvc/mdssvc_es.c
index eb19d5fdc4a..59f91271e59 100644
--- a/source3/rpc_server/mdssvc/mdssvc_es.c
+++ b/source3/rpc_server/mdssvc/mdssvc_es.c
@@ -108,10 +108,12 @@ static bool mdssvc_es_init(struct mdssvc_ctx *mdssvc_ctx)
        }
        TALLOC_FREE(default_path);
 
-       mdssvc_es_ctx->default_fields = 
lp_parm_const_string(GLOBAL_SECTION_SNUM,
-                                                            "elasticsearch",
-                                                            "default_fields",
-                                                            default_fields);
+       default_fields = lp_parm_const_string(GLOBAL_SECTION_SNUM,
+                                             "elasticsearch",
+                                             "default_fields",
+                                             default_fields);
+       mdssvc_es_ctx->default_fields = talloc_strdup(mdssvc_es_ctx,
+                                                     default_fields);
        if (mdssvc_es_ctx->default_fields == NULL) {
                TALLOC_FREE(mdssvc_es_ctx);
                return false;


-- 
Samba Shared Repository

Reply via email to