]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
librbd: localize snap_remove op for mirror snapshots
authorChristopher Hoffman <choffman@redhat.com>
Wed, 19 Apr 2023 15:26:27 +0000 (15:26 +0000)
committerIlya Dryomov <idryomov@gmail.com>
Tue, 16 May 2023 20:16:34 +0000 (22:16 +0200)
commit83844531b15f2dce2e46a1c96f3ae2277a3b879c
tree5627b7fce925b69c0f1b6b85bbc8022cd175cce6
parent66d2555bf878dc4320ea639d90f08170137e2e15
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)
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