Merge pull request #18693 from XinzeChi/wip-dup-async-read-stat

osd/PrimaryLogPG: fix dup stat for async read

Reviewed-by: xie xingguo <xie.xingguo@zte.com.cn>
Reviewed-By: Kefu Chai <kchai@redhat.com>
This commit is contained in:
Kefu Chai 2017-11-05 12:33:19 +08:00 committed by GitHub
commit 2d06baeae7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -7402,7 +7402,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;