]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
librbd/cache/pwl: Using BlockGuard control overlap ops order when flush to osd.
authorJianpeng Ma <jianpeng.ma@intel.com>
Mon, 29 Nov 2021 07:16:21 +0000 (15:16 +0800)
committerJianpeng Ma <jianpeng.ma@intel.com>
Mon, 29 Nov 2021 07:16:52 +0000 (15:16 +0800)
commit8e8f3ef516e98da011f3086f8e78a2fa261293ed
treefd8fdf65e3d301d8e23265ed79a0fcc8de894d88
parent81d7403a7a299ede6225058bed9598615d94fd0d
librbd/cache/pwl: Using BlockGuard control overlap ops  order when flush to osd.

In process of tests, we met some inconsistent-data problem. Test case
mainly use write,then discard to detect data consistent.
W/o pwl, write/discard are synchronous ops. After write, data already
located into osd. But w/ pwl, we use asynchronous api to send ops to
osd.
Although we mare sure send order. But send-order don't makre sure
complete order. This mean pwl keep order of write/discard. But it
don't keep the same semantics which use synchronous api. W/ pwl, it make
synchronous to asynchronous. For normal ops, it's not problem. But if
connected-commands w/ overlap, it make data inconsistent.
So we use BlockGuard to solve this issue.

Fixes: https://tracker.ceph.com/issues/49876
Fixes: https://tracker.ceph.com/issues/53108
Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
src/librbd/cache/pwl/AbstractWriteLog.cc
src/librbd/cache/pwl/AbstractWriteLog.h
src/librbd/cache/pwl/LogEntry.h
src/librbd/cache/pwl/rwl/WriteLog.cc
src/librbd/cache/pwl/ssd/WriteLog.cc