]> 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:04:09 +0000 (11:04 +0100)
commit8dcb791e311c63f7b11694c9846bc11a1ecf3c2c
tree6cdd659fc6df3b21a92a56785fdae64385092c39
parent5dcdb39fbccb28f25ea3b209968582f14225ae62
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