]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
crimson/osd: mark ThrottleReleaser [[nodiscard]] 69697/head
authorKefu Chai <k.chai@proxmox.com>
Wed, 24 Jun 2026 10:10:41 +0000 (18:10 +0800)
committerKefu Chai <k.chai@proxmox.com>
Wed, 24 Jun 2026 10:22:09 +0000 (18:22 +0800)
commitd3df37a61ba6bccdd1b88effb060680bea5d1a40
treecd941782857a43e455acc05f2976944d8e4733de
parenta38b620ccdfada56c078bebe04b9fbb314eca45c
crimson/osd: mark ThrottleReleaser [[nodiscard]]

OperationThrottler::get_throttle() returns a ThrottleReleaser guard whose
destructor calls release_throttle(), the mClock RequestCompletion that
decrements in_progress.  The guard has to be held for the whole operation: a
caller that discards it at acquisition releases the slot in the same step, so
the operation never counts against max_in_progress and the throttle does
nothing.

Mark the type [[nodiscard]] so the compiler flags a discarded co_await of
get_throttle().

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