]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commit
librbd: expose ContextWQ as pure interface for external implementations wip-baum-20260127-00
authorAlexander Indenbaum <aindenba@redhat.com>
Wed, 10 Dec 2025 06:30:26 +0000 (08:30 +0200)
committerAlexander Indenbaum <aindenba@redhat.com>
Tue, 27 Jan 2026 16:07:22 +0000 (18:07 +0200)
commit7d5eff690b84748618b483e12c99230cc54da8b7
treec9c84b37935e6f870887c8fdcba0aff8d2becf58
parent98f9db9cd8315cc97ce0055c5a6f5a28fb85ddc2
librbd: expose ContextWQ as pure interface for external implementations

Make ContextWQ a pure interface in the public API to allow external modules
to provide custom ContextWQ implementations.

- Move ContextWQ to public header as pure interface (no Boost.ASIO dependencies)
- Extract ASIO implementation into separate AsioContextWQ class
- Add to set ContextWQ at open time
  - rbd_open_with_context_wq()
  - rbd_open_read_only_with_context_wq()
- Add rbd_get_ceph_context() C API to retrieve CephContext from RBD image
- Add rbd_context_complete() C API to complete contexts without full Context
  definition
- Change m_context_wq from unique_ptr to shared_ptr for external ownership
- Install public headers via CMake and include in librbd-devel package

Signed-off-by: Alexander Indenbaum <aindenba@redhat.com>
14 files changed:
ceph.spec.in
src/include/rbd/asio/ContextWQ.hpp [new file with mode: 0644]
src/include/rbd/librbd.h
src/librbd/AsioEngine.cc
src/librbd/AsioEngine.h
src/librbd/CMakeLists.txt
src/librbd/ImageCtx.cc
src/librbd/ImageCtx.h
src/librbd/asio/AsioContextWQ.cc [new file with mode: 0644]
src/librbd/asio/AsioContextWQ.h [new file with mode: 0644]
src/librbd/asio/ContextWQ.cc [deleted file]
src/librbd/asio/ContextWQ.h
src/librbd/librbd.cc
src/nvmeof/gateway