]> git.apps.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:05:16 +0000 (11:05 +0100)
commit07e6f3c47b2d85014f463ee3911aedd3b5dc89a5
tree38fde704411349ab2c3b0fb010a49ba3afd70149
parent7960da3cf343979c451fe242652d52c8d2302c07
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