]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
librbd/cache/pwl: adjust compare-and-write compare substringing
authorIlya Dryomov <idryomov@gmail.com>
Mon, 15 Aug 2022 07:44:09 +0000 (09:44 +0200)
committerIlya Dryomov <idryomov@gmail.com>
Thu, 13 Oct 2022 11:11:38 +0000 (13:11 +0200)
commitc4c4f7e763beeaf9d234d00ea198629e078ab1d5
tree353c0dd35b7e1820cf2d8b46eff367dc34548d2e
parent20c0a96ab96132fb86694b548edea84ffb88fa34
librbd/cache/pwl: adjust compare-and-write compare substringing

cmp_bl can no longer be shorter than read_bl (i.e. image extent).
This is caught very early at the API level, see commit af96e6dae3f4
("librbd: make C++ cmp&write semantics equal to C API").

However, cmp_bl can still be longer than read_bl and in that case
it should be capped by the image extent length.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit 35f3ccb68714f18cc1ff78278fdd5216590cc9bf)
src/librbd/cache/pwl/AbstractWriteLog.cc