]> 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>
Mon, 11 Dec 2023 11:56:06 +0000 (12:56 +0100)
commit71b88b5875a5d5caa28e52ddff9d4ea718865095
treee1dc8023d87ccaeb4d4cc1a65138cc0cc0cf36fa
parent984b4574302671ca8f98f7f670ae9e180213b181
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