[PATCH 2/2] libceph: advertise SERVER_REEF
From: Xiubo Li via B4 Relay
Date: Mon Nov 30 2026 - 01:12:58 EST
From: Xiubo Li <xiubo.li@xxxxxxxxx>
Once the OSDMap holds a pg_upmap_primary entry, the monitors require
the SERVER_REEF feature from every client, and "ceph osd
set-require-min-compat-client reef", which pg-upmap-primary needs
first, is refused while clients without it are connected. So a
cluster with kernel clients cannot use the read balancer, and a kernel
client cannot connect to a cluster that already uses it.
SERVER_REEF reuses bit 31, whose first incarnation MON_SINGLE_PAXOS is
retired. Towards clients it only selects the OSDMap encodings that
carry pg_upmap_primary, which libceph decodes now, so advertise it.
Tested on a 3-OSD tentacle cluster with the read balancer
(osdmaptool --read) applied to its pools. Without this series the
monitors drop the session ("missing required protocol features",
0x80000000), so neither a CephFS mount nor an rbd map succeeds. With
it, both work; after the full map at mount time and after a burst of
22 incrementals the kernel's pg_upmap_primary list matches the
cluster's, all reads and writes of a PG go to the chosen primary, and
no OSD logs a misdirected op.
krbd fio on a 128-PG pool whose primaries were split 40/48/40, and
43/43/42 after the read balancer added 5 entries (O_DIRECT, 30 s,
median of 3 runs, MiB/s with p99 latency):
+-----------------------------+------------------+------------------+
| | primary reads | read balancer |
+-----------------------------+------------------+------------------+
| 4M seq read, 4 x qd16 | 4713 (163 ms) | 4995 (128 ms) |
| 4K random read, 4 x qd32 | 586 (1.93 ms) | 594 (1.73 ms) |
+-----------------------------+------------------+------------------+
4K random writes do not change beyond the run-to-run spread. The gain
follows how uneven the primaries were: the busiest OSD went from 37.5%
to 33.6% of the primaries here.
Signed-off-by: Xiubo Li <xiubo.li@xxxxxxxxx>
---
include/linux/ceph/ceph_features.h | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/include/linux/ceph/ceph_features.h b/include/linux/ceph/ceph_features.h
index 1e4dce93a8a1..9202749a820d 100644
--- a/include/linux/ceph/ceph_features.h
+++ b/include/linux/ceph/ceph_features.h
@@ -118,7 +118,8 @@ DEFINE_CEPH_FEATURE_RETIRED(28, 1, OSD_HBMSGS, HAMMER, JEWEL)
DEFINE_CEPH_FEATURE(28, 2, SERVER_MIMIC)
DEFINE_CEPH_FEATURE(29, 1, MDSENC)
DEFINE_CEPH_FEATURE(30, 1, OSDHASHPSPOOL)
-DEFINE_CEPH_FEATURE(31, 1, MON_SINGLE_PAXOS) // deprecate me
+DEFINE_CEPH_FEATURE_RETIRED(31, 1, MON_SINGLE_PAXOS, NAUTILUS, PACIFIC)
+DEFINE_CEPH_FEATURE(31, 3, SERVER_REEF)
DEFINE_CEPH_FEATURE_RETIRED(32, 1, OSD_SNAPMAPPER, JEWEL, LUMINOUS)
DEFINE_CEPH_FEATURE_RETIRED(33, 1, MON_SCRUB, JEWEL, LUMINOUS)
@@ -210,6 +211,7 @@ DEFINE_CEPH_FEATURE_DEPRECATED(63, 1, RESERVED_BROKEN, LUMINOUS) // client-facin
CEPH_FEATURE_CRUSH_TUNABLES2 | \
CEPH_FEATURE_REPLY_CREATE_INODE | \
CEPH_FEATURE_SERVER_MIMIC | \
+ CEPH_FEATURE_SERVER_REEF | \
CEPH_FEATURE_MDSENC | \
CEPH_FEATURE_OSDHASHPSPOOL | \
CEPH_FEATURE_OSD_CACHEPOOL | \
--
2.53.0