]> git.apps.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>
Tue, 9 Mar 2021 21:52:17 +0000 (16:52 -0500)
commit59df5ce246926a3f08f89f331bf34cad18098bcc
treeca81bd2387dbc62d6630d2bcb8791d2ed1321a56
parent4d53e0d8f95ef7143347538481252f34636c0548
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