]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
librbd: fix parent cache races and error handling
authorJason Dillaman <dillaman@redhat.com>
Mon, 13 Jul 2020 20:11:06 +0000 (16:11 -0400)
committerJason Dillaman <dillaman@redhat.com>
Thu, 27 Aug 2020 17:56:04 +0000 (13:56 -0400)
commitcb29f09c8fbc900523eff1cfc4d640215ff125e1
treea3eadcd9c4471c2f65628f986b659d21eee212fd
parentfe496717c9cb8f8ac6fddfb8166fd33283368047
librbd: fix parent cache races and error handling

If the plugin fails to connect to the daemon at start-up it will
crash the process due to a resource deadlock exception being
thrown as the client is destroyed. Additionally, librbd will support
concurrent IO thread processing in the future so the client needs
to be protected by a lock.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit 74a139d2ceb068fd5c77884e2a7be0359a3300c9)

Conflicts:
src/librbd/cache/ParentCacheObjectDispatch.cc:
          register_dispatch->register_object_dispatch
src/librbd/cache/ParentCacheObjectDispatch.cc
src/librbd/cache/ParentCacheObjectDispatch.h
src/test/librbd/CMakeLists.txt
src/test/librbd/cache/test_mock_ParentCacheObjectDispatch.cc [new file with mode: 0644]
src/test/librbd/cache/test_mock_ParentImageCache.cc [deleted file]