]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
Revert "librbd: use task finisher per CephContext" 7667/head
authorJosh Durgin <jdurgin@redhat.com>
Wed, 17 Feb 2016 01:12:31 +0000 (17:12 -0800)
committerJosh Durgin <jdurgin@redhat.com>
Wed, 17 Feb 2016 01:12:31 +0000 (17:12 -0800)
commita2c90b513bec9d22dc773402294baa820d999428
tree9969e9dae5c4b859cf6c2ff8f8119465700a5b18
parent64c1d54354a09a8485193dce9d5da1c526d1aadd
Revert "librbd: use task finisher per CephContext"

Since notify handling was made async from the librados threads in
d898995b0e3ea301b1325f68a0532d57afa3c816 tests can crash during
image close when exclusive locking is enabled.

This occurs because flushing the watches no longer guarantees that all
notifies have been completely handled, and since these are run from
the TaskFinisher attached to the CephContext, notifies added to the
TaskFinisher run after the ImageCtx they refer to has been
destroyed. The notify for exclusive lock release runs into this in
this case.

Looking into this also made me notice that sharing a single
TaskFinisher is not safe currently since all events are cancelled by
ImageWatcher::unregister_watch(), not just those scheduled by that
image.

Example crash backtrace from test_rbd.py:

    at librados/IoCtxImpl.cc:1332

This reverts commit 96563c15159d1ba0e0978e76b8df6a8ab311e5d2.

Fixes: #14780
Signed-off-by: Josh Durgin <jdurgin@redhat.com>
src/librbd/ImageWatcher.cc
src/librbd/TaskFinisher.h