]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
librados/asio: clear cancellation slot in associated executor 68873/head
authorCasey Bodley <cbodley@redhat.com>
Tue, 12 May 2026 18:58:16 +0000 (14:58 -0400)
committerCasey Bodley <cbodley@redhat.com>
Mon, 18 May 2026 17:31:26 +0000 (13:31 -0400)
commitd91bd72f1b87a31283468fbf171159074c187685
treebbdfa4bfa20d243bfdaa566f9dcf7523b37852fc
parent27bbb966dd688bc7b448a5e58689fcc92da264c3
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>
src/librados/librados_asio.h