From: Kefu Chai Date: Tue, 29 Sep 2015 14:26:48 +0000 (+0800) Subject: osd: fix the snapshot reads of evicted tiering pool X-Git-Tag: v9.2.0~14^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F6261%2Fhead;p=ceph.git osd: fix the snapshot reads of evicted tiering pool reset ssc->exsits in finish_ctx() if the ctx->cache_evict is true, and the head is removed. Fixes: #12748 Signed-off-by: Kefu Chai --- diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc index 98922946986e..7d5946b64e2b 100644 --- a/src/osd/ReplicatedPG.cc +++ b/src/osd/ReplicatedPG.cc @@ -6430,7 +6430,8 @@ void ReplicatedPG::finish_ctx(OpContext *ctx, int log_op_type, bool maintain_ssc // apply new object state. ctx->obc->obs = ctx->new_obs; - if (!maintain_ssc && soid.is_head()) { + if (soid.is_head() && !ctx->obc->obs.exists && + (!maintain_ssc || ctx->cache_evict)) { ctx->obc->ssc->exists = false; ctx->obc->ssc->snapset = SnapSet(); } else {