]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
librbd: don't clip expanded diff on truncate in ObjectListSnapsRequest
authorIlya Dryomov <idryomov@gmail.com>
Wed, 28 Feb 2024 13:20:16 +0000 (14:20 +0100)
committerIlya Dryomov <idryomov@gmail.com>
Fri, 15 Mar 2024 10:02:44 +0000 (11:02 +0100)
commit82b53a67f9b3c94296cc4130ebc38710f060f3e0
treec4776aee4db28e2938b00358ee187f10ec1f8783
parent16ff7ac7de165f9249a30ce3d289d399eca570cd
librbd: don't clip expanded diff on truncate in ObjectListSnapsRequest

If the diff was expanded due to LIST_SNAPS_FLAG_WHOLE_OBJECT, clipping
it when handling a truncate is wrong -- when subtracting that interval,
we either split the expanded extent into two or chop off a piece of it.
However the point of LIST_SNAPS_FLAG_WHOLE_OBJECT is to report a single
extent covering the entire object.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit 0ebca5fe22d976f1a17f8078f20a47c49a057edb)
src/librbd/io/ObjectRequest.cc
src/test/librbd/io/test_mock_ObjectRequest.cc