Skip to content

de-list: tools/librbd/client: use purpose-built sequence containers - #72327

Open
chardan wants to merge 27 commits into
ceph:mainfrom
chardan:jfw-delist-tools
Open

chardan wants to merge 27 commits into
ceph:mainfrom
chardan:jfw-delist-tools

Conversation

@chardan

@chardan chardan commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Depends on #72323.

Complete the delist conversion across librbd, RBD tools, the CephFS client,
journal code, Java bindings, and remaining command-line tools. Contiguous
containers hold result sets and batches; deques preserve FIFO and
stable-reference requirements in long-lived queues.

Tests cover interleaved drains, namespace and mirror-status wire compatibility,
journal fixtures, and the retained queue contracts. The final cleanup removes
the last obsolete list import from the converted file set.

Series

These six related PRs target main and share the encoding, callback, and fixture-registration
prerequisites they need. Each subsystem contains its own container conversions, fixture generators,
and consumers.

The Objecter/librados, storage, and cluster-service topics share the prerequisite commits from
#72322. RGW and tools also include the client API prerequisite from #72323. Required commits remain
in each branch so CI can build it before the prerequisite PR merges.

Scope and compatibility

  • Chooses containers according to actual access and lifetime semantics.
  • Preserves wire formats and compatibility adapters where required.
  • Keeps librados interface changes additive; existing callers retain their behavior.
  • Includes focused regression tests for behavior affected by each conversion.

Performance summary

The journal queue shows a material reduction while preserving indexed FIFO
semantics. The combined tool workload improves more dramatically because it
repeatedly constructs, grows, traverses, and drains the affected containers;
complete command latency may include unrelated I/O.

Assisted-by: Codex (GPT-6)

Signed-off-by: Jesse F. Williamson [email protected]

Performance measurements

All values are medians from the retained, checksum-matched isolated harnesses. Negative deltas favor the candidate.

Workload Time before (ns) Time after (ns) Time Instructions before Instructions after Instructions
Journal player queue 204,850,082 145,197,755 -29.12% 4,221,116,524 2,996,746,970 -29.01%
Combined tool-container operations 106,417,168 14,268,491 -86.59% 2,267,116,759 378,904,903 -83.29%

Contribution Guidelines

  • To sign and title your commits, please refer to Submitting Patches to Ceph.

  • If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.

  • When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an x between the brackets: [x]. Spaces and capitalization matter when checking off items this way.

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands

You must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.

@github-actions

github-actions Bot commented Oct 2, 2026

Copy link
Copy Markdown

This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved

@chardan chardan changed the title tools/librbd/client: use purpose-built sequence containers de-list: tools/librbd/client: use purpose-built sequence containers (6 of 6) Oct 2, 2026
@chardan chardan self-assigned this Oct 2, 2026
@github-actions

github-actions Bot commented Oct 6, 2026

Copy link
Copy Markdown

This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved

@chardan
chardan force-pushed the jfw-delist-tools branch 2 times, most recently from 44948af to 4facef7 Compare October 7, 2026 18:28
@chardan
chardan force-pushed the jfw-delist-tools branch 2 times, most recently from 85a0c7a to cce531f Compare October 9, 2026 18:18
@github-actions

Copy link
Copy Markdown

This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved

@chardan
chardan force-pushed the jfw-delist-tools branch 2 times, most recently from a29c808 to 39c54d9 Compare November 23, 2026 20:48
Keep this system and its required declarations, definitions and consumers together.

- encoding: Encoding concepts, deque support, legacy wire bytes, and cross-container decoding.

Review-Class: involved
Content-Type: implementation
Review-System: encoding
Original-Commit: 700f0b4
Source-Partition: d984d35af9d160d942a3adc0bf15ecd01ef56c71

Assisted-by: Codex:GPT-5
Signed-off-by: Jesse F. Williamson <[email protected]>
Keep this system and its required declarations, definitions and consumers together.

- encoding: Review regression scenarios, assertions, and mocks for encoding concepts, deque support, legacy wire bytes, and cross-container decoding.

Review-Class: involved
Content-Type: tests
Review-System: encoding
Original-Commit: 214d6d8
Source-Partition: b2ef0601741d799697d1e1f33ed253259fa9a152

Assisted-by: Codex:GPT-5
Signed-off-by: Jesse F. Williamson <[email protected]>
Keep generated instances in the container supplied by the type and select through its iterator. This supports list and vector generators together, allowing fixture conversions to remain with their owning subsystem instead of changing every generator in one prerequisite.

Assisted-by: Codex (GPT-6)
Signed-off-by: Jesse F. Williamson <[email protected]>
Use contiguous storage by default while accepting existing list callers and preserving their ownership transfer. Keep matching-container swaps and list splices. Construct aggregate contexts with the caller container type so list and vector callers can migrate independently.

Assisted-by: Codex (GPT-6)
Signed-off-by: Jesse F. Williamson <[email protected]>
Move the seven transaction callers with the shared callback factory and remove the obsolete list-named alias. All source callers use the single container-independent entry point, including before the storage queue conversion, so staged PRs do not introduce deprecation warnings.

Assisted-by: Codex (GPT-6)
Signed-off-by: Jesse F. Williamson <[email protected]>
Keep fixture declarations, generators, and direct consumers with their owning subsystem. The shared registry accepts both list and vector generators.

Original-Commit: cde335b
Assisted-by: Codex (GPT-6)
Signed-off-by: Jesse F. Williamson <[email protected]>
Keep this system and its required declarations, definitions and consumers together.

- osdc: Grouped waiter transfer, asynchronous result decoding, and hit-set timestamp rounding.

Review-Class: involved
Content-Type: implementation
Review-System: osdc
Original-Commit: 9d8cc02
Source-Partition: f93cbfe201cc80a81e70b826c5026b8a9df4c81e

Assisted-by: Codex:GPT-5
Signed-off-by: Jesse F. Williamson <[email protected]>
Keep this system and its required declarations, definitions and consumers together.

- librados: Exported overloads, retained compatibility APIs, asynchronous output lifetime, and append/replace/error behavior.

Review-Class: involved
Content-Type: implementation
Review-System: librados
Original-Commit: 797c533
Source-Partition: 5f2c2fea1c6a24d2dbd4b330fe36917785602e7e

Assisted-by: Codex:GPT-5
Signed-off-by: Jesse F. Williamson <[email protected]>
Keep this system and its required declarations, definitions and consumers together.

- librados: Review regression scenarios, assertions, and mocks for exported overloads, retained compatibility APIs, asynchronous output lifetime, and append/replace/error behavior.
- librados: Pool output follows the changed TestRadosClient pool_list interface; this one-line caller belongs with the result API and its test stubs.

Review-Class: involved
Content-Type: tests
Review-System: librados
Original-Commit: 1e11d6c
Source-Partition: 5e4d1e21b0411df54f2d05a84cd35821b3f1efeb
Source-Partition: e2fefa28e35c36d3fc4bdb556e1a6d4d176cd671

Assisted-by: Codex:GPT-5
Signed-off-by: Jesse F. Williamson <[email protected]>
…implementation

Only complete independent conversions and their direct local uses are grouped here.
Conversions supporting an involved API/state/ownership/encoding change remain with that system.

- objecter-scratch: Complete private linger/session scratch conversion: private scan signature, all four declarations and corresponding loops/reserves. This is independent of changed grouped waiter handoffs and asynchronous decoders.

Review-Class: simple
Content-Type: implementation
Independent-Unit: objecter-scratch
Original-Commit: 9d8cc02
Source-Partition: f93cbfe201cc80a81e70b826c5026b8a9df4c81e
Source-Partition: 825c3cfbb2e2fe15609d58ab847d0cbd710f77e4

Assisted-by: Codex:GPT-5
Signed-off-by: Jesse F. Williamson <[email protected]>
Keep fixture declarations, generators, and direct consumers with their owning subsystem. The shared registry accepts both list and vector generators.

Original-Commit: cde335b
Assisted-by: Codex (GPT-6)
Signed-off-by: Jesse F. Williamson <[email protected]>
Keep this system and its required declarations, definitions and consumers together.

- cls-rbd: Result overloads, encoded fields, and legacy result behavior.

Review-Class: involved
Content-Type: implementation
Review-System: cls-rbd
Original-Commit: 8990c44
Source-Partition: 66e3a94e52b5b7390f8b07aeb6ba0755f5569302

Assisted-by: Codex:GPT-5
Signed-off-by: Jesse F. Williamson <[email protected]>
Keep this system and its required declarations, definitions and consumers together.

- cls-rbd: Review regression scenarios, assertions, and mocks for result overloads, encoded fields, and legacy result behavior.

Review-Class: involved
Content-Type: tests
Review-System: cls-rbd
Original-Commit: 99f0d36
Source-Partition: 133566929cacfc3631cb6a4dc8aa1662cfcbb57f

Assisted-by: Codex:GPT-5
Signed-off-by: Jesse F. Williamson <[email protected]>
Fold the existing test caller adaptation into this implementation.
It adds no test cases or expected outcomes. New behavior/regression tests remain separate.

Keep this system and its required declarations, definitions and consumers together.

- librbd-pwl: Log-entry identity, stable nodes, ownership, asynchronous queues, and persistent write-log state.

Review-Class: involved
Content-Type: implementation
Review-System: librbd-pwl
Original-Commit: f754b32
Source-Partition: 8565d6293ab4629d452ad342cd882d66874ae60d


Includes-Test-Adaptation: src/test/librbd/cache/pwl/test_WriteLogMap.cc
Folded-Commit: 6eb0a539ca78403e1f552afb400f179329f1c23e
Folded-Commit: f28b286e5bcccc96675fe8eb83605f4926998ce2

Original-Commit: 5855826
Source-Partition: abe627a3890df36154662ec75c8a79a2ec161c55
Assisted-by: Codex:GPT-5
Signed-off-by: Jesse F. Williamson <[email protected]>
Keep this system and its required declarations, definitions and consumers together.

- librbd: Public overloads, watcher filtering, replay/QoS ownership, encoded sync points, and dependent callers.

Review-Class: involved
Content-Type: implementation
Review-System: librbd
Original-Commit: 0a0e1f0
Source-Partition: 8f0218db70d04f367141d158434ff3fa1558add0

Assisted-by: Codex:GPT-5
Signed-off-by: Jesse F. Williamson <[email protected]>
Keep this system and its required declarations, definitions and consumers together.

- librbd: Review regression scenarios, assertions, and mocks for public overloads, watcher filtering, replay/QoS ownership, encoded sync points, and dependent callers.
- librbd: Watcher mock declarations and arguments implement changed watcher/filtering interfaces; keep with watcher migration tests.

Review-Class: involved
Content-Type: tests
Review-System: librbd
Original-Commit: 8fda853
Source-Partition: 20b5852cc4692e7967d1e62f35d3e152c9b6dbe3
Source-Partition: 8b3de8aa22c312e046d35c51cd5f1b2817c5c889

Assisted-by: Codex:GPT-5
Signed-off-by: Jesse F. Williamson <[email protected]>
Keep this system and its required declarations, definitions and consumers together.

- rbd-tools: Throttler namespace draining, output/parsing, sync-point boundaries, and API consumers.

Review-Class: involved
Content-Type: implementation
Review-System: rbd-tools
Original-Commit: 8b16a72
Source-Partition: 021a788f22d91d9530db2eddddae8142f91998c2

Assisted-by: Codex:GPT-5
Signed-off-by: Jesse F. Williamson <[email protected]>
Keep this system and its required declarations, definitions and consumers together.

- rbd-tools: Review regression scenarios, assertions, and mocks for throttler namespace draining, output/parsing, sync-point boundaries, and API consumers.

Review-Class: involved
Content-Type: tests
Review-System: rbd-tools
Original-Commit: d5866dd
Source-Partition: b55433d1a0780772c57b4d5cc7eb93ffff402d1a

Assisted-by: Codex:GPT-5
Signed-off-by: Jesse F. Williamson <[email protected]>
Keep this system and its required declarations, definitions and consumers together.

- client: Condition signaling, inode/delegation lifetime, tree traversal, directory APIs, and crypt-key state.

Update the reclaim-error fixture to call wait_on_conditions with the migrated
waiter vector. This retains the existing lock and condition-wait semantics and
fixes ceph_test_client compilation.

Review-Class: involved
Content-Type: implementation
Review-System: client
Original-Commit: 909cc23
Source-Partition: a015b5dc8ce350d46acb1f5319dae62aa1feac6f

Assisted-by: Codex:GPT-5
Assisted-by: Codex:GPT-6
Signed-off-by: Jesse F. Williamson <[email protected]>
Keep this system and its required declarations, definitions and consumers together.

- journal: Replay identity, newest-first commit positions, duplicate replacement, and append-buffer ownership.

Review-Class: involved
Content-Type: implementation
Review-System: journal
Original-Commit: 4d7aa11
Source-Partition: f7ba8fc22a7828fabfe1508e1bcb4a20bb7cdc05

Assisted-by: Codex:GPT-5
Signed-off-by: Jesse F. Williamson <[email protected]>
Keep this system and its required declarations, definitions and consumers together.

- journal: Review regression scenarios, assertions, and mocks for replay identity, newest-first commit positions, duplicate replacement, and append-buffer ownership.
- journal: Entry fixtures use the new replay output type; retain complete fixture/caller adaptations with the replay system.

Review-Class: involved
Content-Type: tests
Review-System: journal
Original-Commit: 571fe70
Source-Partition: d3f0d4231d8f3bf56c5ff52fdcbc2e6f06c96dda
Source-Partition: 48c85733a9b7a323290850c1d5f54946c3ff7d58

Assisted-by: Codex:GPT-5
Signed-off-by: Jesse F. Williamson <[email protected]>
Fold the existing test caller adaptation into this implementation.
It adds no test cases or expected outcomes. New behavior/regression tests remain separate.

Keep this system and its required declarations, definitions and consumers together.

- tools: Benchmark/cache interfaces, eviction-result contracts, and dependent consumers.
- tools: Pool and get_leaves locals follow protected librados output or changed MDS traversal interfaces; these are integrations of the earlier involved systems.

Review-Class: involved
Content-Type: implementation
Review-System: tools
Original-Commit: e8cd988
Source-Partition: 55e9f635ad7eb9449a0c57fe96d5c17b62f05e15
Source-Partition: ac29502b9731c2419ddb1b2aa613c63aa11d5fd2


Includes-Test-Adaptation: src/test/immutable_object_cache/test_SimplePolicy.cc
Folded-Commit: f853641d3b3c3d341eaf4682e3bb8bb7442c2144
Folded-Commit: 99efff57ac2229ee128ae2e1b9e5119f00e66bc0

Original-Commit: 2d25aba
Source-Partition: 5ead4785e6d96ab9a0d897d0824678d4ad7919f9
Assisted-by: Codex:GPT-5
Signed-off-by: Jesse F. Williamson <[email protected]>
…tation

Only complete independent conversions and their direct local uses are grouped here.
Conversions supporting an involved API/state/ownership/encoding change remain with that system.

- librbd-local: Complete private action/waiter/flush and BlockGuard snapshot conversions, with corresponding declarations and uses. Watcher API mocks, PWL map-result tests and replay-dependent Entry fixtures are excluded.
- tools-local: Independent CLI filtering, mirror action FIFO or unused includes. Protected librados and MDS traversal integrations are excluded.

Review-Class: simple
Content-Type: implementation
Independent-Unit: librbd-local
Independent-Unit: tools-local
Original-Commit: 0a0e1f0
Original-Commit: 8b16a72
Original-Commit: 909cc23
Original-Commit: e8cd988
Source-Partition: 19c716f67c86967848fbc82008b48cac80c34c96
Source-Partition: 5348ca132808445e6be053efa8b852a94421b0d2
Source-Partition: 81dbf7ced1abd7c611d907fe592ad9593f0d617b
Source-Partition: 58b18be7673bcc270d97a909f82e0c3d3b3b5d33
Source-Partition: ac29502b9731c2419ddb1b2aa613c63aa11d5fd2

Assisted-by: Codex:GPT-5
Signed-off-by: Jesse F. Williamson <[email protected]>
Only complete independent conversions and their direct local uses are grouped here.
Conversions supporting an involved API/state/ownership/encoding change remain with that system.

- librbd-local: Complete private action/waiter/flush and BlockGuard snapshot conversions, with corresponding declarations and uses. Watcher API mocks, PWL map-result tests and replay-dependent Entry fixtures are excluded.
- test-local: Independent private test/benchmark fixture sequences; assertions and production interfaces remain unchanged.

Review-Class: simple
Content-Type: tests
Independent-Unit: librbd-local
Independent-Unit: test-local
Original-Commit: 8fda853
Original-Commit: d5866dd
Original-Commit: 571fe70
Source-Partition: 20b5852cc4692e7967d1e62f35d3e152c9b6dbe3
Source-Partition: 8b3de8aa22c312e046d35c51cd5f1b2817c5c889
Source-Partition: 13c69cb4a3a7c05ba11441727843a291122c85eb
Source-Partition: 48c85733a9b7a323290850c1d5f54946c3ff7d58

Assisted-by: Codex:GPT-5
Signed-off-by: Jesse F. Williamson <[email protected]>
Reserving exactly the combined size for each incoming batch forces
repeated reallocations and quadratic movement of pending buffers.
Let vector push_back grow capacity geometrically while preserving
the initial swap and move semantics. Document the partial-drain
tradeoff and the workload condition for revisiting compaction.

Assisted-by: Codex:GPT-5
Signed-off-by: Jesse F. Williamson <[email protected]>
Assisted-by: Codex (GPT-6)
Signed-off-by: Jesse F. Williamson <[email protected]>
Assisted-by: Codex (GPT-6)
Signed-off-by: Jesse F. Williamson <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant