]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commit
librbd: fix split() for SparseExtent and SparseBufferlistExtent
authorIlya Dryomov <idryomov@gmail.com>
Mon, 12 Feb 2024 10:00:45 +0000 (11:00 +0100)
committerIlya Dryomov <idryomov@gmail.com>
Wed, 14 Feb 2024 13:15:04 +0000 (14:15 +0100)
commit746cb28449903ceec2fe3ffcfa5e925eb78eb7b2
treeddd73a9dbe52fa5f6de4b088c5dcd3d7cce24c15
parentbab43e83ad74841f19b4294dbbe2edc306759a8d
librbd: fix split() for SparseExtent and SparseBufferlistExtent

SparseExtents and SparseBufferlist are typedefs for interval_map.  In
both cases, split() handler is broken: for the former the extent isn't
actually split and for the latter incorrect bufferlist is attached to
the split extent.

Fortunately, both SnapshotDelta as produced by ObjectListSnapsRequest
and SparseBufferlist used in a couple of places seem to be collections
where only disjoint intervals are inserted and splitting doesn't occur
(at least in the common case).  But still, this is a landmine waiting
for someone to step on it.

Fixes: https://tracker.ceph.com/issues/64423
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
src/librbd/io/Types.h
src/test/librbd/io/test_mock_ObjectRequest.cc