]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
librbd: deep-copy should not write to objects that cannot exist
authorJason Dillaman <dillaman@redhat.com>
Thu, 19 Jul 2018 16:34:59 +0000 (12:34 -0400)
committerJason Dillaman <dillaman@redhat.com>
Thu, 19 Jul 2018 17:23:00 +0000 (13:23 -0400)
commitfbd6ea1ffd4befe0b13213be9bc17808ff89a85e
tree8877db9525f711c4ccb43d91c243c85bea1b4f4a
parent326fdd94c916202dd7ca8680d6d271b3d7599b50
librbd: deep-copy should not write to objects that cannot exist

If an image has a snapshot and is subsequently shrunk, ensure that
discard ops are not sent to the deep-copy objects beyond the bounds
of the image at a given snapshot/HEAD. Only a remove op should be
expected in such cases.

Fixes: http://tracker.ceph.com/issues/25000
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
src/librbd/deep_copy/ObjectCopyRequest.cc
src/librbd/deep_copy/ObjectCopyRequest.h
src/test/librbd/deep_copy/test_mock_ObjectCopyRequest.cc