libceph: EC direct reads, pool migration and stretch EC #1
All Vouch review confidence checks passed
Residual risk 0.30 = Change Risk (0.75) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.75 · 650 lines diff across 8 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.388
Shallow Review Depth
shallow_review_depth
0.289
Sensitive Paths
sensitive_paths
0.075
Real PR Conversation Timeline
1 comments
"Review active on #1"
general
weight: 0.35
aainscow
Kernel client (libceph) support for three Ceph server features, for review by the team before an RFC to ceph-devel. The base branch
kport-base-testingis ceph-clienttesting(ccd87864c, 7.4-rc2). The diff is the series, then two DNM commits: debugfs counters used by the test harness, and the test plan for a real machine inkport-notes/TEST-PLAN.md.v6, 2026-11-13: the FIXUPs from Bill Scales' reviews and from Bob's review are folded in, and the large patches are split for review: no patch is over 700 lines. Patch 1 is a fix for mainline, independent of the rest. The tree is the one tested overnight (
wip-kport-v3con this fork keeps that head with its FIXUPs) plus that fix and its KUnit test. 33 patches:testingon its own (branchwip-libceph-linger-uaf); its KUnit test is patch 33, as it needs the series' test helpers.2. feature bits SERVER_OCTOPUS..SERVER_VAMPIRE
3. decode pg_pool_t up to v33
4. decode pg_pool_t v34 (pool migration state)
5. pg_upmap_primaries
6. the primary-first pg_temp order of optimized EC pools
7. enabling EC optimizations as a new interval
8. decode the migration watermark of a redirect reply
9. follow pool migrations (routing)
10. keep the migration watermarks of redirected requests
11. show pool migrations in debugfs
12. move linger requests on a pool migration redirect
13. advertise SERVER_OCTOPUS..SERVER_VAMPIRE
14. GET_INTERNAL_VERSIONS_V2 and the EC direct read flags
15. a reply carrying data for more than one op
16. ceph: read from the primary when the object version is needed
17. decode a pool's tiering and dedup tier
18. EC direct reads
19. one-shot requests to a given shard
20. split EC direct reads across shards
21. fall back to GET_INTERNAL_VERSIONS for split reads
Patch 20 (split reads, about 550 lines) is kept whole: every way of splitting it leaves an intermediate kernel that either returns torn data (assembly before the version check) or writes into the buffers of a cancelled request (no cancel handling).
Changes from Bob's review
1. Split-read cancel races: a split read's completion now runs under
osdc->lock(for read when the data is put together, for write when the read is resent to the primary) and calls the callback after dropping it, soceph_osdc_cancel_request()either cancels the read first or finds it completed or resent. The split keeps the OSD client, so nothing reads the request before the cancel check.2. A cancel during the fallback to the primary is no longer lost (same change).
3. The watermark entry is allocated before
osdc->lockis taken for write; without it the redirected request fails with -ENOMEM instead of bouncing between source and target.4. Pools of size 0 are refused at decode, whatever the encoding.
5. EC direct reads follow
pg_pool_t::allows_nonprimary_reads(): not for tiers, pools with tiers or pools with a dedup tier (tier_of, tiers and the dedup tier pool option are decoded now). Replica reads of replicated pools are unchanged.6. Only the version op's own -EOPNOTSUPP switches the client to GET_INTERNAL_VERSIONS; the commit message says the switch lasts until remount.
7. The SERVER_* commit message now says what SERVER_QUINCY changes: rules match any pool size.
8. checkpatch: the KUnit help text is longer;
(1ULL << n)is kept, as in the rest of the file. The FIXUPs are folded and the DNM commits stay last.9. Patch structure: see above. Not done yet: a struct for
ceph_is_new_interval()'s arguments (left for after this round, as it changes code that has been tested), and therecalc_linger_target()declaration stays next to its user, since its return type is defined mid-file.Every fix comes with a KUnit test that fails without it, except the allocation failure (3), which can't be injected without a hook in the code.
Found overnight
Requests to a pool that had migrated hung across a PG merge in the migration target. libceph learns of PG merges only from the force resend epoch that the monitors set in the pool being merged, and
calc_target()checked it in the base pool only. Now the pool a migration sends the request to is checked too (patch 9). In a chaos run, two krbd writes waited 15 minutes, until the next migration moved them; there were no data errors. KUnitmigration_merge_testfails without the fix. In a recreate on the test machine, a migrated pool's pg_num went from 32 to 16 under three krbd clients. All three stalled for 12 minutes before the fix and none stalled with it.Testing
CONFIG_CEPH_LIB_KUNIT_TEST): 6 suites, 57 cases, all passing under KASAN and lockdep, kmemleak clean.- The tests drive the client's real paths with OSD sessions that never connect:
- whole OSD maps are encoded as the monitors encode them, including a CRUSH map of two datacenters, and decoded with
ceph_osdmap_decode();- new maps go through
handle_one_map();- OSD replies, including migration redirects, go through
handle_reply();- reply data goes through
osd_sparse_read().- Every defect fixed in the series has a test shown failing without its fix, except the allocation failure of Bob's item 3 and the fs/ceph change (covered on the libceph side only).
BIT_ULLand MAINTAINERS notes for the new test files.- the regression suite, migrations M01-M09 and watch/notify/lock tests L01-L05, thrashing S01-S02 (150 verify cycles each);
- ported qa: fsx on krbd on five pools (replicated, EC 4+2, EC 8+3, EC 4+2 over zones with balance and with localize), the krbd fs workunits, and nine kcephfs workunits, all passing;
- zone tests 4/4 (a first failure was the test running during a PG merge);
- one kernel bug found: M04 (EC to replicated migration) showed that a direct read redirected into a replicated pool kept its EC direct-read flag, which OSDs with https://github.com/ceph/ceph/pull/72651 refuse. Fixed in patch 18, with a KUnit test; M04 then passed 3 of 3.
- CephFS fscrypt truncate-then-extend fails on unpatched 7.3 as well, so it is not from the series.
- the whole suite again, the krbd cram tests (14/14), the RBD workunits (12/13: a guest udev race in krbd_data_pool.sh), the krbd fs workunits (4/4), the kcephfs workunits and xfstests;
- vstart_chaos runs with kernel clients as the workloads, pool migrations of their pools, zone faults and a rolling upgrade from Umbrella under kernel I/O: over 150 guest runs and 11,000 verify cycles, 0 errors;
- the only series bug found was the PG merge hang above.
Not done yet
The commits carry
Assisted-by: Claude Codeand no Signed-off-by yet.🤖 Raised by Claude Code.