]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/PrimaryLogPG: drop odd maintain_ssc hack
authorSage Weil <sage@redhat.com>
Fri, 8 Sep 2017 19:24:42 +0000 (15:24 -0400)
committerSage Weil <sage@redhat.com>
Thu, 21 Sep 2017 18:29:35 +0000 (14:29 -0400)
This was added two years ago by b61f3e43f1c9d43daa0dedd7cbd0fe5787cbdfbb,
but I can see why it is needed here.  The test case for that
original bug (from a3442cf07841a7269713e30ca270f2f9c356a598) passes
fine.

Signed-off-by: Sage Weil <sage@redhat.com>
src/osd/PrimaryLogPG.cc
src/osd/PrimaryLogPG.h

index bee2c3642fc7c9dee4d6e8f7bdeeaa269e83fbb3..b02149605e3558ac69e08edbc63742f35339ba58 100644 (file)
@@ -7298,7 +7298,7 @@ int PrimaryLogPG::prepare_transaction(OpContext *ctx)
   return result;
 }
 
-void PrimaryLogPG::finish_ctx(OpContext *ctx, int log_op_type, bool maintain_ssc)
+void PrimaryLogPG::finish_ctx(OpContext *ctx, int log_op_type)
 {
   const hobject_t& soid = ctx->obs->oi.soid;
   dout(20) << __func__ << " " << soid << " " << ctx
@@ -7382,9 +7382,7 @@ void PrimaryLogPG::finish_ctx(OpContext *ctx, int log_op_type, bool maintain_ssc
   // apply new object state.
   ctx->obc->obs = ctx->new_obs;
 
-  if (soid.is_head() &&
-      !ctx->obc->obs.exists &&
-      (!maintain_ssc || ctx->cache_evict)) {
+  if (soid.is_head() && !ctx->obc->obs.exists) {
     ctx->obc->ssc->exists = false;
     ctx->obc->ssc->snapset = SnapSet();
   } else {
@@ -12776,7 +12774,7 @@ bool PrimaryLogPG::agent_maybe_evict(ObjectContextRef& obc, bool after_flush)
   if (obc->obs.oi.is_dirty())
     --ctx->delta_stats.num_objects_dirty;
   assert(r == 0);
-  finish_ctx(ctx.get(), pg_log_entry_t::DELETE, false);
+  finish_ctx(ctx.get(), pg_log_entry_t::DELETE);
   simple_opc_submit(std::move(ctx));
   osd->logger->inc(l_osd_tier_evict);
   osd->logger->inc(l_osd_agent_evict);
index e1d2614f24ae14facb01cee74993b5b34652a951..f03ee11290148b0f0338ca3e9533b11640e1d074 100644 (file)
@@ -1097,7 +1097,7 @@ protected:
     const hobject_t& head, const hobject_t& coid,
     object_info_t *poi);
   void execute_ctx(OpContext *ctx);
-  void finish_ctx(OpContext *ctx, int log_op_type, bool maintain_ssc=true);
+  void finish_ctx(OpContext *ctx, int log_op_type);
   void reply_ctx(OpContext *ctx, int err);
   void reply_ctx(OpContext *ctx, int err, eversion_t v, version_t uv);
   void make_writeable(OpContext *ctx);