]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/PrimaryLogPG: fix dup stat for async read 18693/head
authorXinze Chi <xinze@xsky.com>
Fri, 3 Nov 2017 03:12:52 +0000 (11:12 +0800)
committerXinze Chi <xinze@xsky.com>
Fri, 3 Nov 2017 03:15:44 +0000 (11:15 +0800)
The async read would call do_osd_ops twice.

Signed-off-by: Xinze Chi <xinze@xsky.com>
src/osd/PrimaryLogPG.cc

index ac3db593e67228d096dc55ea68c595070caf04ee..712743028e8f6fe4b767e29061d305898eb1389d 100644 (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;