]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
ReplicatedPG: be more careful about calling publish_stats_to_osd() correctly 8039/head
authorGreg Farnum <gfarnum@redhat.com>
Fri, 11 Mar 2016 01:24:04 +0000 (17:24 -0800)
committerGreg Farnum <gfarnum@redhat.com>
Sat, 12 Mar 2016 00:56:03 +0000 (16:56 -0800)
We had moved the call out of eval_repop into a lambda, but that left out
a few other code paths and is fragile. So just call it unconditionally in
eval_repop() when we're done with the repop instead.

Fixes: #14962
Signed-off-by: Greg Farnum <gfarnum@redhat.com>
src/osd/ReplicatedPG.cc

index a403e9d6f961db43f161a5c6b22feb49cae2a082..b72c1d43a2521b37eeee5789489fe0cd39227e59 100644 (file)
@@ -3010,8 +3010,6 @@ void ReplicatedPG::execute_ctx(OpContext *ctx)
        log_op_stats(
          ctx);
 
-      publish_stats_to_osd();
-
       if (m && m->wants_ondisk() && !ctx->sent_disk) {
        // send commit.
        MOSDOpReply *reply = ctx->reply;
@@ -8355,6 +8353,7 @@ void ReplicatedPG::eval_repop(RepGather *repop)
   if (repop->all_applied && repop->all_committed) {
     repop->rep_done = true;
 
+    publish_stats_to_osd();
     calc_min_last_complete_ondisk();
 
     for (auto p = repop->on_success.begin();