librbd: disallow group snap rollback if memberships don't match
Before proceeding with group rollback, ensure that the set of images
that took part in the group snapshot matches the set of images that are
currently part of the group. Otherwise, because we preserve affected
snapshots when an image is removed from the group, data loss can ensue
where an image gets rolled back while part of another group or not part
of any group but long repurposed for something else.
Similarly, ensure that the group snapshot is complete.
Fixes: https://tracker.ceph.com/issues/66300
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit
f212a9ca5b9238b80ae5c728a7bf99366ed910a1)
Conflicts:
src/test/pybind/test_rbd.py [ commit
d7fd66ec9944 ("librbd: add
rbd_clone4() API to take parent snapshot by ID") not in reef ]