Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
464 changes: 464 additions & 0 deletions SPECS/ceph/1000-arch-add-riscv-crc32c-support.patch

Large diffs are not rendered by default.

63 changes: 63 additions & 0 deletions SPECS/ceph/1001-arch-riscv-fix-hwprobe.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
From 3ccfff1acd6fa5babc7de035271b7f91fccabb8c Mon Sep 17 00:00:00 2001
From: WenLei <lei.wen2@zte.com.cn>
Date: Fri, 27 Mar 2026 16:40:14 +0800
Subject: [PATCH] src/arch: fix hwprobe include path and ZBC/ZVBC offsets for
riscv64
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: WenLei <lei.wen2@zte.com.cn>

Fix runtime detection of RISC-V ZBC and ZVBC crypto extensions.

Problems fixed:
- <sys/hwprobe.h> only exists in glibc >= 2.40 (released 2024-07-22).
Many production RISC-V distros still use older glibc (Ubuntu 22.04: 2.35,
Debian 12: 2.36, etc.) and would fail to compile.
Therefore we switch to the kernel UAPI header <asm/hwprobe.h>,
which works with all current glibc versions.
Proof:
- Absent in glibc 2.39:
https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/unix/sysv/linux/riscv/sys/hwprobe.h;hb=refs/tags/glibc-2.39
- Present in glibc 2.40:
https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/unix/sysv/linux/riscv/sys/hwprobe.h;hb=refs/tags/glibc-2.40
- Introducing commit:
https://sourceware.org/git/?p=glibc.git;a=commit;h=426d0e1aa8f17426d13707594111df712d2b8911

- Incorrect fallback bit positions:
- RISCV_HWPROBE_EXT_ZBC was (1ULL << 15) → should be (1ULL << 7)
- RISCV_HWPROBE_EXT_ZVBC was (1ULL << 20) → should be (1ULL << 18)

Signed-off-by: WenLei <lei.wen2@zte.com.cn>
---
src/arch/riscv.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/arch/riscv.c b/src/arch/riscv.c
index d7c306c6e16ab..90ab9cb872c70 100644
--- a/src/arch/riscv.c
+++ b/src/arch/riscv.c
@@ -2,7 +2,7 @@
* Runtime detection of RISC-V vector crypto support.
*/

-#include <sys/hwprobe.h>
+#include <asm/hwprobe.h>
#include <sys/syscall.h>
#include <unistd.h>

@@ -10,11 +10,11 @@ int ceph_arch_riscv_zbc = 0;
int ceph_arch_riscv_zvbc = 0;

#ifndef RISCV_HWPROBE_EXT_ZBC
-#define RISCV_HWPROBE_EXT_ZBC (1ULL << 15)
+#define RISCV_HWPROBE_EXT_ZBC (1ULL << 7)
#endif

#ifndef RISCV_HWPROBE_EXT_ZVBC
-#define RISCV_HWPROBE_EXT_ZVBC (1ULL << 20)
+#define RISCV_HWPROBE_EXT_ZVBC (1ULL << 18)
#endif

static int do_hwprobe(struct riscv_hwprobe *pairs, size_t count)
25 changes: 25 additions & 0 deletions SPECS/ceph/1002-src-common-Formatter.h-cstdint.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Sun Yuechi <sunyuechi@iscas.ac.cn>
Date: Sun, 10 May 2026 16:06:17 +0800
Subject: [PATCH] common: add missing <cstdint> include in Formatter.h

Formatter.h uses `uint64_t` but relies on transitive includes, which
breaks with gcc 16's libstdc++. Fixed upstream

Signed-off-by: Sun Yuechi <sunyuechi@iscas.ac.cn>
---
src/common/Formatter.h | 1 +
1 file changed, 1 insertion(+)

diff --git a/src/common/Formatter.h b/src/common/Formatter.h
index 05814ec66..cba1d4238 100644
--- a/src/common/Formatter.h
+++ b/src/common/Formatter.h
@@ -14,6 +14,7 @@
#include <stdarg.h>
#include <sstream>
#include <map>
+#include <cstdint>
#include <vector>

namespace ceph {
84 changes: 84 additions & 0 deletions SPECS/ceph/1003-mds-qualify-make_message.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
From ea218daf73965fdaee54693bbfcd675c031992f9 Mon Sep 17 00:00:00 2001
From: "Adam C. Emerson" <aemerson@redhat.com>
Date: Wed, 21 Jan 2026 17:31:23 -0500
Subject: [PATCH] mds: Fully qualify some calls to `make_message`

`crimson::make_message` participates in some of the same overloads as
`ceph::make_message` and GCC 16 looks to be doing ADL differently than
GCC 15.

(Also fix the indentation on `reply_client_request`.)

Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
---
src/mds/Locker.cc | 2 +-
src/mds/MDCache.cc | 2 +-
src/mds/Server.cc | 8 ++++----
3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/mds/Locker.cc b/src/mds/Locker.cc
index 58305db60683b..2cb92de118138 100644
--- a/src/mds/Locker.cc
+++ b/src/mds/Locker.cc
@@ -4501,7 +4501,7 @@ void Locker::handle_client_lease(const cref_t<MClientLease> &m)
dout(7) << "handle_client_lease client." << client << " renew on " << *dn
<< (!dn->lock.can_lease(client)?", revoking lease":"") << dendl;
if (dn->lock.can_lease(client)) {
- auto reply = make_message<MClientLease>(*m);
+ auto reply = ceph::make_message<MClientLease>(*m);
int pool = 1; // fixme.. do something smart!
reply->h.duration_ms = (int)(1000 * mdcache->client_lease_durations[pool]);
reply->h.seq = ++l->seq;
diff --git a/src/mds/MDCache.cc b/src/mds/MDCache.cc
index 623a2e2348a19..d1cb751f54388 100644
--- a/src/mds/MDCache.cc
+++ b/src/mds/MDCache.cc
@@ -10720,7 +10720,7 @@ void MDCache::handle_discover(const cref_t<MDiscover> &dis)


CInode *cur = 0;
- auto reply = make_message<MDiscoverReply>(*dis);
+ auto reply = ceph::make_message<MDiscoverReply>(*dis);

snapid_t snapid = dis->get_snapid();

diff --git a/src/mds/Server.cc b/src/mds/Server.cc
index ea60c5030dfc0..f406678d66b96 100644
--- a/src/mds/Server.cc
+++ b/src/mds/Server.cc
@@ -154,7 +154,7 @@ class Batch_Getattr_Lookup : public BatchOp {
}
}
batch_reqs.clear();
- server->reply_client_request(mdr, make_message<MClientReply>(*mdr->client_request, r));
+ server->reply_client_request(mdr, ceph::make_message<MClientReply>(*mdr->client_request, r));
}
void print(std::ostream& o) const override {
o << "[batch front=" << *mdr << "]";
@@ -2167,7 +2167,7 @@ void Server::respond_to_request(const MDRequestRef& mdr, int r)
dout(20) << __func__ << ": batch head " << *mdr << dendl;
mdr->release_batch_op()->respond(r);
} else {
- reply_client_request(mdr, make_message<MClientReply>(*mdr->client_request, r));
+ reply_client_request(mdr, ceph::make_message<MClientReply>(*mdr->client_request, r));
}
} else if (mdr->internal_op > -1) {
dout(10) << __func__ << ": completing with result " << cpp_strerror(r) << " on internal " << *mdr << dendl;
@@ -2315,7 +2315,7 @@ void Server::early_reply(const MDRequestRef& mdr, CInode *tracei, CDentry *trace
}


- auto reply = make_message<MClientReply>(*req, 0);
+ auto reply = ceph::make_message<MClientReply>(*req, 0);
reply->set_unsafe();

// mark xlocks "done", indicating that we are exposing uncommitted changes.
@@ -2657,7 +2657,7 @@ void Server::handle_client_request(const cref_t<MClientRequest> &req)
req->get_op() != CEPH_MDS_OP_OPEN &&
req->get_op() != CEPH_MDS_OP_CREATE)) {
dout(5) << "already completed " << req->get_reqid() << dendl;
- auto reply = make_message<MClientReply>(*req, 0);
+ auto reply = ceph::make_message<MClientReply>(*req, 0);
if (created != inodeno_t()) {
bufferlist extra;
set_reply_extra_bl(req, created, extra);
28 changes: 28 additions & 0 deletions SPECS/ceph/1004-mgr-diskprediction-disable-mypy-error.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
From 848abacfc7b9e532d362be02d7a3486f7f633f37 Mon Sep 17 00:00:00 2001
From: John Mulligan <jmulligan@redhat.com>
Date: Fri, 13 Jun 2025 18:05:50 -0400
Subject: [PATCH] pybind/mgr: disable mypy error in diskprediction_local module

Currently on python 3.12 mypy detects one of the variables used in the
expression as an zero-element tuple. This module is not getting a lot
of attention so I'm doing the bare minimum to stop the tests from
failing here and silencing mypy with a magic comment.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
---
src/pybind/mgr/diskprediction_local/predictor.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/pybind/mgr/diskprediction_local/predictor.py b/src/pybind/mgr/diskprediction_local/predictor.py
index 3bbe7a4b7f232..858c52965941c 100644
--- a/src/pybind/mgr/diskprediction_local/predictor.py
+++ b/src/pybind/mgr/diskprediction_local/predictor.py
@@ -168,7 +168,7 @@ def __preprocess(self, disk_days: Sequence[DevSmartT], manufacturer: str) -> Opt
roll_window_size = 6

# rolling means generator
- dataset_size = disk_days_attrs.shape[0] - roll_window_size + 1
+ dataset_size = disk_days_attrs.shape[0] - roll_window_size + 1 # type: ignore
gen = (disk_days_attrs[i: i + roll_window_size, ...].mean(axis=0)
for i in range(dataset_size))
means = np.vstack(gen) # type: ignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Sun Yuechi <sunyuechi@iscas.ac.cn>
Date: Sun, 10 May 2026 16:06:17 +0800
Subject: [PATCH] monitoring/ceph-mixin: bump jsonnet-bundler JSONNET_VERSION
to v0.5.1

v0.4.0 lacks x/sys riscv64 stubs needed for `go install` on riscv64.

Signed-off-by: Sun Yuechi <sunyuechi@iscas.ac.cn>
---
monitoring/ceph-mixin/jsonnet-bundler-build.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/monitoring/ceph-mixin/jsonnet-bundler-build.sh b/monitoring/ceph-mixin/jsonnet-bundler-build.sh
index d713cffb8..a6be64288 100755
--- a/monitoring/ceph-mixin/jsonnet-bundler-build.sh
+++ b/monitoring/ceph-mixin/jsonnet-bundler-build.sh
@@ -1,6 +1,6 @@
#!/bin/sh -ex

-JSONNET_VERSION="v0.4.0"
+JSONNET_VERSION="v0.5.1"
OUTPUT_DIR=${1:-$(pwd)}

git clone -b ${JSONNET_VERSION} --depth 1 https://github.com/jsonnet-bundler/jsonnet-bundler
30 changes: 30 additions & 0 deletions SPECS/ceph/2002-monitoring-ceph-mixin-bump-pylint.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Sun Yuechi <sunyuechi@iscas.ac.cn>
Date: Sun, 10 May 2026 16:06:17 +0800
Subject: [PATCH] monitoring/ceph-mixin: bump pylint to 2.17.7 for Python 3.11+

pylint 2.6.0 pulls wrapt 1.12.1, which imports inspect.formatargspec
(removed in Python 3.11), breaking `tox -e lint` at venv setup on
Python 3.13.

2.17.7 is the last 2.x release and keeps .pylintrc usable as-is
(pylint 3.x renamed many of the checkers it references).

Signed-off-by: Sun Yuechi <sunyuechi@iscas.ac.cn>
---
monitoring/ceph-mixin/requirements-lint.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/monitoring/ceph-mixin/requirements-lint.txt b/monitoring/ceph-mixin/requirements-lint.txt
index 8c7219897..3c5b039f2 100644
--- a/monitoring/ceph-mixin/requirements-lint.txt
+++ b/monitoring/ceph-mixin/requirements-lint.txt
@@ -11,7 +11,7 @@ dataclasses==0.6
types-dataclasses==0.6.1
six==1.16.0
toml==0.10.2
-pylint==2.6.0
+pylint==2.17.7
isort==5.10.0
mypy==0.910
mypy-extensions==0.4.3
51 changes: 51 additions & 0 deletions SPECS/ceph/2003-cephadm-tox-py313-compat.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Sun Yuechi <sunyuechi@iscas.ac.cn>
Date: Sun, 10 May 2026 16:06:17 +0800
Subject: [PATCH] cephadm: tox.ini Python 3.13 / tarball-build compatibility

Two fixes to src/cephadm/tox.ini that both block run-tox-cephadm on a
Python 3.13 build env consuming a release tarball.

1) Bump pyfakefs 5.3.5 -> >= 5.7.0, < 6.
5.3.5 (2024-02) lacks Py3.13 support; 5.7.0 (2024-08) added it.
Upper bound < 6 avoids 6.0.0 (2025-12) which dropped < py3.10 and
changed FakeFilesystem back-link semantics the cephadm tests rely
on. Upstream still pins 5.3.5 on main/squid/reef -- drop once
upstream bumps.

2) Drop the two `git ls-files ... docker.io / quay.io | wc -l`
assertions in the flake8 env. They require a .git dir, which a
release tarball has none of, and only guard against new
container-registry refs in dev PRs -- zero value on a frozen
tarball (the in-tree comment even anticipates downstream tweaks).
Pure downstream-tarball issue, no upstream tracker.

Signed-off-by: Sun Yuechi <sunyuechi@iscas.ac.cn>
---
src/cephadm/tox.ini | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/src/cephadm/tox.ini b/src/cephadm/tox.ini
index 13104797d..9d86aecf1 100644
--- a/src/cephadm/tox.ini
+++ b/src/cephadm/tox.ini
@@ -33,7 +33,7 @@ skip_install=true
deps =
-rzipapp-reqs.txt
pyfakefs == 4.5.6 ; python_version < "3.7"
- pyfakefs == 5.3.5 ; python_version >= "3.7"
+ pyfakefs >= 5.7.0, < 6 ; python_version >= "3.7"
mock
pytest
pyyaml
@@ -58,10 +58,6 @@ deps =
flake8-quotes
commands =
flake8 --config=tox.ini {posargs:cephadm.py cephadmlib}
- bash -c 'test $(git ls-files 'cephadm.py' 'cephadmlib/*.py' | sort -u | xargs grep "docker.io" | wc -l) == 1'
- bash -c 'test $(git ls-files 'cephadm.py' 'cephadmlib/*.py' | sort -u | xargs grep "quay.io" | wc -l) == 8'
-# Downstream distributions may choose to alter this "docker.io" number,
-# to make sure no new references to docker.io are creeping in unnoticed.

# coverage env is intentionally left out of the envlist. It is here for developers
# to run locally to generate and review test coverage of cephadm.
47 changes: 47 additions & 0 deletions SPECS/ceph/2004-test-mds-quiesce-agent-evaluate-await-idle.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Sun Yuechi <sunyuechi@iscas.ac.cn>
Date: Sun, 10 May 2026 16:06:17 +0800
Subject: [PATCH] test/mds: actually evaluate await_idle_v in
QuiesceAgentTest::update

The TestQuiesceAgent fixture's update() helper wraps the call to
await_idle_v() in a libc assert(). With NDEBUG defined (which openRuyi
sets via the standard cmake RelWithDebInfo flags, like Fedora and most
distros), assert() expands to ((void)0) and its argument is never
evaluated, so await_idle_v() is never called. The test then immediately
reads the default-constructed async_ack (db_version=(0:0), empty roots)
and races ahead of the agent thread, failing 4 of 7 sub-tests
(DbUpdates / QuiesceProtocol / DuplicateQuiesceRequest /
TimeoutBeforeComplete) with assertions like:

Expected equality of these values:
1
ack->db_version
Which is: (0:0)

The bug is also present in upstream main (TestQuiesceAgent.cc:195)
but happens to be masked on faster x86 because the agent thread can
sometimes still beat the test thread to setting async_ack within the
small window before the read; on slower riscv64 cores the race is lost
deterministically. Replace assert() with gtest's EXPECT_TRUE() which
always evaluates its argument and produces a proper test failure
message on timeout.

Signed-off-by: Sun Yuechi <sunyuechi@iscas.ac.cn>
---
src/test/mds/TestQuiesceAgent.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/test/mds/TestQuiesceAgent.cc b/src/test/mds/TestQuiesceAgent.cc
index aa108075f..7940d8a50 100644
--- a/src/test/mds/TestQuiesceAgent.cc
+++ b/src/test/mds/TestQuiesceAgent.cc
@@ -192,7 +192,7 @@ class QuiesceAgentTest : public testing::Test {
if (WaitForAgent::No == wait) {
return std::nullopt;
} else {
- assert(await_idle_v(v.set_version));
+ EXPECT_TRUE(await_idle_v(v.set_version));
return async_ack;
}
}
36 changes: 36 additions & 0 deletions SPECS/ceph/2005-osd-osd_types-pg_fast_info_t-value-init.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Sun Yuechi <sunyuechi@iscas.ac.cn>
Date: Sun, 10 May 2026 16:06:17 +0800
Subject: [PATCH] osd/osd_types: value-initialize pg_fast_info_t test instances

`new pg_fast_info_t` (no parens) is default-init, which leaves the POD
members in the nested anonymous struct uninitialized. check-generated.sh
runs two ceph-dencoder processes and byte-compares the output, so
whichever heap garbage each process sees makes the test fail
non-deterministically; on riscv64 it fails every run with num_object_copies
holding a 0x5555_... heap pointer value.

Add `()` to force value-init. Upstream main fixes the same bug by changing
the API to return-by-value with emplace_back() (PR #63910), but that
touches 273 files and is not viable to backport to 20.2.1.

Signed-off-by: Sun Yuechi <sunyuechi@iscas.ac.cn>
---
src/osd/osd_types.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/osd/osd_types.h b/src/osd/osd_types.h
index b14686b77..29421f76a 100644
--- a/src/osd/osd_types.h
+++ b/src/osd/osd_types.h
@@ -3335,8 +3335,8 @@ struct pg_fast_info_t {
f->close_section();
}
static void generate_test_instances(std::list<pg_fast_info_t*>& o) {
- o.push_back(new pg_fast_info_t);
- o.push_back(new pg_fast_info_t);
+ o.push_back(new pg_fast_info_t());
+ o.push_back(new pg_fast_info_t());
o.back()->last_update = eversion_t(1, 2);
o.back()->last_complete = eversion_t(3, 4);
o.back()->last_user_version = version_t(5);
Loading
Loading