finish_ctx does a dance to update the pg stats correctly despite
racing scrub or backfill; move this into a helper.
Signed-off-by: Sage Weil <sage@redhat.com>
ctx->obc->ssc->snapset = ctx->new_snapset;
}
+ apply_ctx_stats(ctx, scrub_ok);
+}
+
+void ReplicatedPG::apply_ctx_stats(OpContext *ctx, bool scrub_ok)
+{
info.stats.stats.add(ctx->delta_stats);
+ const hobject_t& soid = ctx->obs->oi.soid;
for (set<pg_shard_t>::iterator i = backfill_targets.begin();
i != backfill_targets.end();
++i) {
void reply_ctx(OpContext *ctx, int err, eversion_t v, version_t uv);
void make_writeable(OpContext *ctx);
void log_op_stats(OpContext *ctx);
+ void apply_ctx_stats(OpContext *ctx,
+ bool scrub_ok=false); ///< true if we should skip scrub stat update
void write_update_size_and_usage(object_stat_sum_t& stats, object_info_t& oi,
interval_set<uint64_t>& modified, uint64_t offset,