From: Xinze Chi Date: Fri, 3 Nov 2017 03:12:52 +0000 (+0800) Subject: osd/PrimaryLogPG: fix dup stat for async read X-Git-Tag: v13.0.1~283^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F18693%2Fhead;p=ceph.git osd/PrimaryLogPG: fix dup stat for async read The async read would call do_osd_ops twice. Signed-off-by: Xinze Chi --- diff --git a/src/osd/PrimaryLogPG.cc b/src/osd/PrimaryLogPG.cc index ac3db593e67..712743028e8 100644 --- a/src/osd/PrimaryLogPG.cc +++ b/src/osd/PrimaryLogPG.cc @@ -7445,7 +7445,8 @@ int PrimaryLogPG::prepare_transaction(OpContext *ctx) // read-op? write-op noop? done? if (ctx->op_t->empty() && !ctx->modify) { - unstable_stats.add(ctx->delta_stats); + if (ctx->pending_async_reads.empty()) + unstable_stats.add(ctx->delta_stats); if (ctx->op->may_write() && get_osdmap()->require_osd_release >= CEPH_RELEASE_KRAKEN) { ctx->update_log_only = true;