From b61f3e43f1c9d43daa0dedd7cbd0fe5787cbdfbb Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Tue, 29 Sep 2015 22:26:48 +0800 Subject: [PATCH] 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 --- src/osd/ReplicatedPG.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 { -- 2.47.3