]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
librbd: localize snap_remove op for mirror snapshots 51428/head
authorChristopher Hoffman <choffman@redhat.com>
Wed, 19 Apr 2023 15:26:27 +0000 (15:26 +0000)
committerIlya Dryomov <idryomov@gmail.com>
Wed, 24 May 2023 18:04:31 +0000 (20:04 +0200)
commit08c38d2571c0e239e2a00334f68a7c406f2ebf62
tree96c8e1aafea4b52d078368d5aa7a22a0c7767ba8
parent7bde6a65aa90e7ba95e8ab203650ecbc801c9d8f
librbd: localize snap_remove op for mirror snapshots

A client may attempt a lock request not quickly enough to
obtain exclusive lock for operations when another competing
client responds quicker. This can happen when a peer site has
different performance characteristics or latency. Instead of
relying on this unpredictable behavior, localize operation to
primary cluster.

Fixes: https://tracker.ceph.com/issues/59393
Signed-off-by: Christopher Hoffman <choffman@redhat.com>
(cherry picked from commit ac552c9b4d65198db8038d397a3060d5a030917d)

Conflicts:
src/cls/rbd/cls_rbd.cc [ commit 3a93b40721a1 ("librbd:
  s/boost::variant/std::variant/") not in quincy ]
src/librbd/mirror/snapshot/UnlinkPeerRequest.cc [ ditto ]
src/cls/rbd/cls_rbd.cc
src/librbd/api/Mirror.cc
src/librbd/mirror/snapshot/CreatePrimaryRequest.cc
src/librbd/mirror/snapshot/UnlinkPeerRequest.cc
src/librbd/mirror/snapshot/UnlinkPeerRequest.h
src/test/cls_rbd/test_cls_rbd.cc
src/test/librbd/mirror/snapshot/test_mock_CreatePrimaryRequest.cc
src/test/librbd/mirror/snapshot/test_mock_UnlinkPeerRequest.cc
src/test/librbd/test_mirroring.cc
src/test/rbd_mirror/image_replayer/snapshot/test_mock_Replayer.cc
src/tools/rbd_mirror/image_replayer/snapshot/Replayer.cc