]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
crimson/osd: coroutinize OSD methods 69437/head
authorKefu Chai <k.chai@proxmox.com>
Fri, 12 Jun 2026 09:30:11 +0000 (17:30 +0800)
committerKefu Chai <k.chai@proxmox.com>
Wed, 17 Jun 2026 10:54:08 +0000 (18:54 +0800)
commitded0d4c14649206a58b3ca3236315f9a29cb328e
treea55d37b5e0a5ba0cc9986480bc60ce7323555ef5
parent17c6e03f17f464b3c94e8e0f45c34e09746cbab7
crimson/osd: coroutinize OSD methods

this change migrate most of the OSD implementation to C++20 coroutine
when appropriate to improve the readability and maintainability.

there are two patterns in this migration:

- mechanic replacing future-promise then() chain with co_await/co_return
- replace `return <ready future>` with a `co_return` statement
- replace `seastar::do_for_each()` with a regular for loop, and
  optionally restructure the code so it's more compacted.
- replace handle_exception() with regular try-catch block

Signed-off-by: Kefu Chai <k.chai@proxmox.com>
src/crimson/osd/osd.cc