]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
librbd: deep-copy should not write to objects that cannot exist 23358/head
authorJason Dillaman <dillaman@redhat.com>
Thu, 19 Jul 2018 16:34:59 +0000 (12:34 -0400)
committerPrashant D <pdhange@redhat.com>
Wed, 1 Aug 2018 01:03:51 +0000 (21:03 -0400)
commite40bc9f1ae33d61a584cde5985377e82852dd375
tree2ad4d92d0486c123d64d3638d1fc86001e7118b3
parenteaee6d3beab3429232ceb188377a3f94e844fca7
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>
(cherry picked from commit fbd6ea1ffd4befe0b13213be9bc17808ff89a85e)
src/librbd/deep_copy/ObjectCopyRequest.cc
src/librbd/deep_copy/ObjectCopyRequest.h
src/test/librbd/deep_copy/test_mock_ObjectCopyRequest.cc