]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
osd: avoid two copy with same src cancel each other
authorYuanXin <yuanxin@didiglobal.com>
Sun, 21 Feb 2021 07:08:07 +0000 (15:08 +0800)
committermyoungwon oh <ohmyoungwon@gmail.com>
Thu, 8 Apr 2021 04:58:08 +0000 (13:58 +0900)
commitdb13b9abd5a6eed11b237f8a69c6f347241ca142
tree34466aecca30b101805521ac1fd0a1609ee5733a
parent94a0af289c594a238fce1f393d4f4ec392258138
osd: avoid two copy with same src cancel each other

For cache tier, if some head object has two snaps, the two snaps share the same clone object,
and the clone object was flush/evicted from cache pool, when a rollback requests and a read
snap request to these two snaps at the same time will generate two promote requests to the
same clone object, these two promote requests will generate two copy ops with same src, than
the second copy op will cancel the first copy op by calling cancel_copy and kick_object_context_blocked,
but after calling kick_object_context_blocked, a new promote request corresponding to first
copy op will be restarted and generate a new copy op, the new copy op will cancel the second
copy op again, so two promote requests will cancel their copy op each other and run into dead
loop.

Fixes: https://tracker.ceph.com/issues/49409
Signed-off-by: YuanXin <yuanxin@didiglobal.com>
src/osd/PrimaryLogPG.cc
src/osd/PrimaryLogPG.h
src/test/librados/tier_cxx.cc