From 03784457ab77617ddafc048b01044858b1e65bd3 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 (cherry picked from commit b61f3e43f1c9d43daa0dedd7cbd0fe5787cbdfbb) --- 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 548390f1e9274..05a718b26e27e 100644 --- a/src/osd/ReplicatedPG.cc +++ b/src/osd/ReplicatedPG.cc @@ -5862,7 +5862,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.39.5