]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
librbd/mirror: unlink peer might recursively loop
authorJason Dillaman <dillaman@redhat.com>
Thu, 10 Dec 2020 03:30:17 +0000 (22:30 -0500)
committerJason Dillaman <dillaman@redhat.com>
Thu, 10 Dec 2020 13:31:53 +0000 (08:31 -0500)
commit18a45503011a572325e09b56d5ab799a15ee83d4
tree4db958e3162b9901e9216df76e16fb92eb751c74
parent32fb8e9a3864c7395a29018f54f93eb7158767fe
librbd/mirror: unlink peer might recursively loop

If the mirror peer set is (incorrectly) empty, it's not currently
possible for the unlink peer state machine to properly delete the
snapshot. This can result in a recursive loop between the create
primary snapshot state machine and the unlink peer state machine
until the stack depth grows too large.

Fixes: https://tracker.ceph.com/issues/48525
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
src/librbd/mirror/snapshot/UnlinkPeerRequest.cc
src/librbd/mirror/snapshot/UnlinkPeerRequest.h
src/test/librbd/mirror/snapshot/test_mock_UnlinkPeerRequest.cc