librbd: collapse API mirror primary/non-primary namespaces to single type
authorJason Dillaman <dillaman@redhat.com>
Mon, 3 Feb 2020 20:09:28 +0000 (15:09 -0500)
committerJason Dillaman <dillaman@redhat.com>
Wed, 19 Feb 2020 15:36:40 +0000 (10:36 -0500)
commitf91f13c2aa4580f60db3bd5c4568ce3d0bcc45c8
tree12e353a7f678d67a3c5e6876f425c76483407cbf
parenta7bdbe59fa87ff7a7bf4c6193f76f4c7aa56af55
librbd: collapse API mirror primary/non-primary namespaces to single type

Eventually we will want to be able to chain multiple peers together.
In order to avoid special logic for syncing non-primary snapshots from
a peer, just treat all mirror snapshots the same.

This also clears some confusion for how to handle demoted snapshots
since otherwise it would involve creating a primary-snapshot on the
non-primary image before the image was fully synced.

Finally, the copied flag was renamed to completed since we should
eventually only set this to true on primary snapshots after the
image state has been created.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
src/include/rbd/librbd.h
src/include/rbd/librbd.hpp
src/librbd/api/Snapshot.cc
src/librbd/api/Snapshot.h
src/librbd/librbd.cc
src/pybind/rbd/rbd.pyx
src/test/librbd/test_mirroring.cc
src/test/pybind/test_rbd.py
src/tools/rbd/action/MirrorImage.cc
src/tools/rbd/action/Snap.cc