]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
osd: avoid two copy with same src cancel each other 39593/head
authorYuanXin <yuanxin@didiglobal.com>
Sun, 21 Feb 2021 07:08:07 +0000 (15:08 +0800)
committerYuanXin <yuanxin@didiglobal.com>
Mon, 1 Mar 2021 23:52:59 +0000 (07:52 +0800)
commit617f7114e261595e2e85970e171dcad41f283599
treeb0de03a23a88faf2e39d11f3b3353840d0a0d1bd
parent471e270674ed3033c42f83cceb02061569e2ab1d
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