From: Casey Bodley Date: Thu, 11 Dec 2025 16:34:00 +0000 (-0500) Subject: librados: aio_unwatch() delivers ENOTCONN to AioCompletion X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=c0c146d37ae793fd1e1ab2a5118eac40149f2c6b;p=ceph.git librados: aio_unwatch() delivers ENOTCONN to AioCompletion 94f42b648feea77bd09dc3fdb48e6db2b48c7717 added a new error condition to IoCtx::aio_unwatch() that callers aren't prepared to handle. instead of returning that error directly, report it asynchronously to the AioCompletion Signed-off-by: Casey Bodley --- diff --git a/src/librados/IoCtxImpl.cc b/src/librados/IoCtxImpl.cc index 410f18820acb..4496e60e3fb2 100644 --- a/src/librados/IoCtxImpl.cc +++ b/src/librados/IoCtxImpl.cc @@ -1786,7 +1786,12 @@ int librados::IoCtxImpl::aio_unwatch(uint64_t cookie, AioCompletionImpl *c) c->io = this; boost::intrusive_ptr linger_op = objecter->linger_by_cookie(cookie); if (!linger_op) { - return -ENOTCONN; + // reject invalid cookies with ENOTCONN, but deliver to the + // AioCompletion instead of returning directly + boost::asio::defer(client->finish_strand, + boost::asio::append(CB_AioCompleteAndSafe(c), -ENOTCONN)); + + return 0; } Context *oncomplete = new C_aio_linger_Complete(c, linger_op, true);