]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: fix the snapshot reads of evicted tiering pool 6261/head
authorKefu Chai <kchai@redhat.com>
Tue, 29 Sep 2015 14:26:48 +0000 (22:26 +0800)
committerKefu Chai <kchai@redhat.com>
Wed, 14 Oct 2015 13:43:12 +0000 (21:43 +0800)
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 <kchai@redhat.com>
src/osd/ReplicatedPG.cc

index 98922946986e17d1a918510b081548bd1ba645fc..7d5946b64e2bcab79e1074ac6b999cb26c568e12 100644 (file)
@@ -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 {