From d5efb8a7be2deb0d1b83631b43b171fbe469af8a Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Fri, 8 Sep 2017 15:24:42 -0400 Subject: [PATCH] osd/PrimaryLogPG: drop odd maintain_ssc hack 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 --- src/osd/PrimaryLogPG.cc | 8 +++----- src/osd/PrimaryLogPG.h | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/osd/PrimaryLogPG.cc b/src/osd/PrimaryLogPG.cc index bee2c3642fc..b02149605e3 100644 --- a/src/osd/PrimaryLogPG.cc +++ b/src/osd/PrimaryLogPG.cc @@ -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); diff --git a/src/osd/PrimaryLogPG.h b/src/osd/PrimaryLogPG.h index e1d2614f24a..f03ee112901 100644 --- a/src/osd/PrimaryLogPG.h +++ b/src/osd/PrimaryLogPG.h @@ -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);