]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
librados/asio: clear cancellation slot in associated executor 69050/head
authorCasey Bodley <cbodley@redhat.com>
Tue, 12 May 2026 18:58:16 +0000 (14:58 -0400)
committerCasey Bodley <cbodley@redhat.com>
Thu, 21 May 2026 16:01:29 +0000 (12:01 -0400)
commitb5ade012340a83fb1874526b850ec5d67d9d2a6d
treef9b5d05ee7a4e7c422bd2f2703d20e034223fa96
parent9759ddbde210d900cf329c4d6cda8b608918ce73
librados/asio: clear cancellation slot in associated executor

the librados callback function `AsyncOp::aio_dispatch()` runs on
Objecter's finisher strand executor, and dispatches the completion
handler to its associated executor

asio cancellation is not thread-safe, so should be synchronized on that
associated executor. move the call to `slot.clear()` from that librados
callback into the AsyncHandler wrapper so it doesn't run until we've
switched to the correct executor

because our `op_cancellation` handler depends on an `AioCompletion`
pointer, we have to clear the cancellation slot before that
`AioCompletion` lifetime ends

Fixes: https://tracker.ceph.com/issues/73475
Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit d91bd72f1b87a31283468fbf171159074c187685)
src/librados/librados_asio.h