]> 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>
Fri, 19 Feb 2021 15:46:15 +0000 (10:46 -0500)
commitecd3778a6f9a6ca33aebbf47cef79db5f04157a9
tree8b2f6d78149db4dd5dc2683c05dcb9bb0897ad0c
parentc9378ab8293e531a49970a01becd9762cf1f8f80
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>
src/tools/rbd_mirror/image_replayer/snapshot/Replayer.cc