]> git.apps.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>
Mon, 8 Jul 2024 11:53:54 +0000 (13:53 +0200)
commit985cae644712c8f26ad45ed131f923fe05e0cb1b
treead8751c707f3c568590dfebdf82df3f89e8462b0
parente8d9dfedad0b019055322091d211a8305ba6ffa5
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 ]
src/cls/rbd/cls_rbd_types.h
src/librbd/api/Group.cc
src/test/pybind/test_rbd.py