]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
librbd: reacquire lock should properly handle failed watcher
authorJason Dillaman <dillaman@redhat.com>
Thu, 6 Sep 2018 17:38:17 +0000 (13:38 -0400)
committerJason Dillaman <dillaman@redhat.com>
Wed, 19 Sep 2018 18:52:48 +0000 (14:52 -0400)
commit2057d99f451e3007d4fd05a88faa968319d0ba90
tree73bb262a3240d4328204dad1eb4368e0de751d55
parentb4fc7b520a6fbef90faa70527bc8b72ee08df01d
librbd: reacquire lock should properly handle failed watcher

If the watch has been lost, assume the lock has been lost but attempt
to reacquire it if and when the watch is re-established.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
src/librbd/ImageWatcher.cc
src/librbd/ManagedLock.cc
src/librbd/ManagedLock.h
src/test/librbd/mock/MockExclusiveLock.h
src/test/librbd/test_mock_ManagedLock.cc
src/test/rbd_mirror/test_mock_LeaderWatcher.cc
src/tools/rbd_mirror/LeaderWatcher.cc