]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
librbd: discard cache state if compare-and-write writes to disk
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)
commit20c0a96ab96132fb86694b548edea84ffb88fa34
tree935a71c0cd5a8b9e60565fe5211a1f6214e02d15
parentb64033a657e0066159b43fc9a1750c3c2ea20e11
librbd: discard cache state if compare-and-write writes to disk

Otherwise this is obviously broken with rbd_cache_policy = writeback or
rbd_cache_policy = writethrough as the write is done on the OSD, beneath
ObjectCacher.  This went unnoticed because the original (and so far the
only known) compare-and-write user, tcmu-runner rbd driver, disables the
cache altogether.

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