]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
librbd: fix read_whole_object handling in ObjectListSnapsRequest
authorIlya Dryomov <idryomov@gmail.com>
Mon, 27 Nov 2023 10:59:26 +0000 (11:59 +0100)
committerIlya Dryomov <idryomov@gmail.com>
Mon, 11 Dec 2023 11:51:57 +0000 (12:51 +0100)
commitacd1ba8423c6bec116b087a591a027ca5ce4c9a4
treebf4a64f7519501c28b12545fa11243346f15f358
parent2e7c426539e01aa59c297218e193af803e0653fb
librbd: fix read_whole_object handling in ObjectListSnapsRequest

Originally, in commit 2be4840afd4f ("librados/snap_set_diff: don't
assert on empty snapset"), exists was set to true.  This didn't make
ObjectListSnapsRequest, causing the following deep-copy tests to fail
when run against calc_snap_set_diff() rigged to return "whole object"
as described in [1]:

    TestDeepCopy.Snaps
    TestDeepCopy.SnapDiscard
    TestDeepCopy.CloneHideParent
    TestDeepCopy.Snaps_LargerDstObjSize
    TestDeepCopy.Snaps_SmallerDstObjSize

This is a regression introduced in commit cc87a8bd697e ("librbd:
deep-copy object utilizes image-extent IO methods") by way of commit
11923e234efc ("librbd: generic object list snapshot request").

[1] https://github.com/ceph/ceph/pull/20648#issuecomment-369292309

Fixes: https://tracker.ceph.com/issues/63654
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit 0a1f633e0240b4a7cfbcddd96d53fbf4b17f0b28)
src/librbd/io/ObjectRequest.cc
src/test/librbd/io/test_mock_ObjectRequest.cc