]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commit
osdc: remove implicit LingerOp reference between watch/unwatch wip-librados-aio-unwatch-enotconn
authorCasey Bodley <cbodley@redhat.com>
Thu, 11 Dec 2025 19:19:01 +0000 (14:19 -0500)
committerCasey Bodley <cbodley@redhat.com>
Fri, 12 Dec 2025 16:00:50 +0000 (11:00 -0500)
commit8fe58c3cb41373a9708a9cdacf1e5d35d6019218
treed49259a4f5e4138669add3f23071b00090731e4e
parent20ff49d4e44b7d3b02c3ee80173462c0655e6a1c
osdc: remove implicit LingerOp reference between watch/unwatch

before this change set, linger_register() returned a raw LingerOp
pointer with an implicit reference for the caller. for librados,
this implicit reference is only dropped when the corresponding
unwatch() calls linger_cancel()

after commit 94f42b648feea77bd09dc3fdb48e6db2b48c7717 introduced
linger_by_cookie(), unwatch() no longer has a safe way to drop this
implicit reference. to prevent LingerOp leaks when unwatch() returns
ENOTCONN, we can't hold this implicit reference count until unwatch()

linger_register() now returns an explicit reference to the caller as
intrusive_ptr<LingerOp>. this helps to guarantee that this reference
count gets dropped before the completion of watch()/aio_watch()

because linger_register() no longer acquires an implicit reference for
the caller, linger_cancel() no longer drops it with info->put()

Reported-by: Ilya Dryomov <idryomov@gmail.com>
Signed-off-by: Casey Bodley <cbodley@redhat.com>
src/osdc/Objecter.cc