]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
rbd-mirror: ensure that the last non-primary snapshot cannot be pruned
authorJason Dillaman <dillaman@redhat.com>
Thu, 11 Feb 2021 20:45:01 +0000 (15:45 -0500)
committerJason Dillaman <dillaman@redhat.com>
Mon, 22 Feb 2021 13:17:33 +0000 (08:17 -0500)
commitb4db13c433fea13a713d779b1a72f94f4d40291d
treeecc43aaa9aa2e28c208de5c38d999d46a764667a
parent85d3592f81071588611dffdf312497cfde550f24
rbd-mirror: ensure that the last non-primary snapshot cannot be pruned

Tweak the normal pruning behavior to ensure that an incomplete initial
non-primary snapshot is not included in the prune set since we know
it will be complete since otherwise the image would have been deleted
due to not updating the mirror-image-state to enabled. Also ensure
we cannot prune a non-primary mirror snapshot if we don't have a
predecessor.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit ecd3778a6f9a6ca33aebbf47cef79db5f04157a9)
src/tools/rbd_mirror/image_replayer/snapshot/Replayer.cc