]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: fix the snapshot reads of evicted tiering pool 6589/head
authorKefu Chai <kchai@redhat.com>
Tue, 29 Sep 2015 14:26:48 +0000 (22:26 +0800)
committerAbhishek Lekshmanan <abhishek.lekshmanan@ril.com>
Sat, 14 Nov 2015 19:02:58 +0000 (00:32 +0530)
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>
(cherry picked from commit b61f3e43f1c9d43daa0dedd7cbd0fe5787cbdfbb)

src/osd/ReplicatedPG.cc

index 548390f1e9274b9e0bc54570422ce4bc5d24a9ad..05a718b26e27e3fa45678f59204261521d3efd5f 100644 (file)
@@ -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 {