osd/PrimaryLogPG: fix dup stat for async read

The async read would call do_osd_ops twice.

Signed-off-by: Xinze Chi <xinze@xsky.com>
This commit is contained in:
Xinze Chi 2017-11-03 11:12:52 +08:00
parent e0ff2b38f8
commit 87d188b848

View File

@ -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;