]> git-server-git.apps.pok.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>
Sat, 2 Dec 2023 12:50:04 +0000 (13:50 +0100)
commit0a1f633e0240b4a7cfbcddd96d53fbf4b17f0b28
tree71ff5aae083dbb3b2280a9fe52ba8428dd2f8701
parent8f86d80614680afecbfe82b2a6e965678a3c6034
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>
src/librbd/io/ObjectRequest.cc
src/test/librbd/io/test_mock_ObjectRequest.cc