]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
librbd: disallow group snap rollback if memberships don't match
authorIlya Dryomov <idryomov@gmail.com>
Fri, 14 Jun 2024 12:04:39 +0000 (14:04 +0200)
committerIlya Dryomov <idryomov@gmail.com>
Sun, 23 Jun 2024 09:52:25 +0000 (11:52 +0200)
commit548375fadbee42d9fdca2b9280319ea501337e09
tree8cc52666de3a17f9bcea5590b6979aaed8ec77a5
parente8b1aedc0a5b0d9a664c74dfe34c974a3f021a6a
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)
src/cls/rbd/cls_rbd_types.h
src/librbd/api/Group.cc
src/test/pybind/test_rbd.py