diff --git a/0044-tracing-Fix-C-type-errors-in-librados-tracing.patch b/0044-tracing-Fix-C-type-errors-in-librados-tracing.patch new file mode 100644 index 0000000000000000000000000000000000000000..2e88b63d1c4b919b5dbec4f00c5c520287de7bdb --- /dev/null +++ b/0044-tracing-Fix-C-type-errors-in-librados-tracing.patch @@ -0,0 +1,69 @@ +From a8b926b2280f9b59c95ff15d3e93716b97b7cd63 Mon Sep 17 00:00:00 2001 +From: Xianwei Zhang +Date: Thu, 11 Sep 2025 14:44:00 +0800 +Subject: [PATCH] RDC:ZXOS-1124383 tracing: Fix C type errors in librados + tracing + +Upstream: +https://github.com/ceph/ceph/commit/f9aea9105b6c1a8d7bff0ec0675f84f2ffb1db6f + +This fixes type errors like this: + +In file included from /usr/include/lttng/tracepoint-event.h:69, + from …-build/include/tracing/librados.h:4143, + from …/src/tracing/librados.c:6 +: +…-build/include/tracing/librados.h: + In function ‘lttng_ust__event_probe__librados___rados_mon_command_exit’: +…-build/include/tracing/librados.h:477:9: error: initialization of ‘size_t’ {aka ‘long unsigned int’} from ‘size_t *’ {aka ‘long unsigned int *’} makes integer from pointer without a cast + 477 | ceph_ctf_integerp(size_t, outslen, outslen) + | ^~~~~~~~~~~~~~~~~ + +GCC 14 will likely treat these type mismatches as an error +and fail the build. + +Signed-off-by: Florian Weimer +Signed-off-by: Xianwei Zhang +--- + src/tracing/librados.tp | 4 ++-- + src/tracing/tracing-common.h | 2 +- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/src/tracing/librados.tp b/src/tracing/librados.tp +index 80bb79f9c..f12bcf2d3 100644 +--- a/src/tracing/librados.tp ++++ b/src/tracing/librados.tp +@@ -2586,7 +2586,7 @@ TRACEPOINT_EVENT(librados, rados_watch3_enter, + TP_FIELDS( + ctf_integer_hex(rados_ioctx_t, ioctx, ioctx) + ctf_string(oid, oid) +- ctf_integer_hex(uint64_t, phandle, phandle) ++ ctf_integer_hex(uint64_t*, phandle, phandle) + ctf_integer_hex(rados_watchcb2_t, callback, callback) + ctf_integer(uint32_t, timeout, timeout) + ctf_integer_hex(void*, arg, arg) +@@ -2616,7 +2616,7 @@ TRACEPOINT_EVENT(librados, rados_aio_watch2_enter, + ctf_integer_hex(rados_ioctx_t, ioctx, ioctx) + ctf_string(oid, oid) + ctf_integer_hex(rados_completion_t, completion, completion) +- ctf_integer_hex(uint64_t, phandle, phandle) ++ ctf_integer_hex(uint64_t*, phandle, phandle) + ctf_integer_hex(rados_watchcb2_t, callback, callback) + ctf_integer(uint32_t, timeout, timeout) + ctf_integer_hex(void*, arg, arg) +diff --git a/src/tracing/tracing-common.h b/src/tracing/tracing-common.h +index 3e07f9de8..03449ab58 100644 +--- a/src/tracing/tracing-common.h ++++ b/src/tracing/tracing-common.h +@@ -21,7 +21,7 @@ + // type should be an integer type + // val should have type type* + #define ceph_ctf_integerp(type, field, val) \ +- ctf_integer(type, field, (val) == NULL ? 0 : (val)) \ ++ ctf_integer(type, field, (val) == NULL ? 0 : *(val)) \ + ctf_integer(uint8_t, field##_isnull, (val) == NULL) + + // val should have type char* +-- +2.27.0 + diff --git a/ceph.spec b/ceph.spec index f794f5ac09c6a78a0d7044de94ed08d9383ed77b..0b73826c384d799fe670777d1c05ad875b25ec09 100644 --- a/ceph.spec +++ b/ceph.spec @@ -1,4 +1,4 @@ -%define anolis_release 5 +%define anolis_release 6 # # spec file for package ceph # @@ -128,6 +128,7 @@ Patch0040: 0040-add-loongarch64-support-for-ceph-18.2.1.patch Patch0041: 0041-fix-close-can-not-be-find-in-TUDPTransport.cc.patch Patch0042: 0042-add-riscv64-support-for-ceph-18.2.1.patch Patch0043: 0043-bugfix-for-CVE-2025-52555.patch +Patch0044: 0044-tracing-Fix-C-type-errors-in-librados-tracing.patch ################################################################################# # dependencies that apply across all distro families ################################################################################# @@ -2027,6 +2028,9 @@ exit 0 %{_datadir}/snmp/mibs %changelog +* Thu Sep 11 2025 Xianwei Zhang - 18.2.1-6 +- Fix C type errors in librados tracing + * Tue Aug 12 2025 tomcruiseqi - 18.2.1-5 - Rebuild with gtest 1.15.2