]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/PG: drop dup call to publish_stats_to_osd in Active AdvMap handler
authorSage Weil <sage@redhat.com>
Tue, 12 Dec 2017 19:26:28 +0000 (13:26 -0600)
committerSage Weil <sage@redhat.com>
Thu, 11 Jan 2018 23:07:00 +0000 (17:07 -0600)
Signed-off-by: Sage Weil <sage@redhat.com>
src/osd/PG.cc

index 76660d242831547cc045ab6b1e8ce12552c99f66..39beef8caf5d97dd0bb8698d555d10b752073a28 100644 (file)
@@ -7386,6 +7386,7 @@ boost::statechart::result PG::RecoveryState::Active::react(const AdvMap& advmap)
     return forward_event();
   }
   ldout(pg->cct, 10) << "Active advmap" << dendl;
+  bool need_publish = false;
 
   if (advmap.osdmap->require_osd_release >= CEPH_RELEASE_MIMIC) {
     const auto& new_removed_snaps = advmap.osdmap->get_new_removed_snaps();
@@ -7464,7 +7465,7 @@ boost::statechart::result PG::RecoveryState::Active::react(const AdvMap& advmap)
       // share updated purged_snaps to mgr/mon so that we (a) stop reporting
       // purged snaps and (b) perhaps share more snaps that we have purged
       // but didn't fit in pg_stat_t.
-      pg->publish_stats_to_osd();
+      need_publish = true;
       pg->share_pg_info();
     }
   } else if (!pg->pool.newly_removed_snaps.empty()) {
@@ -7482,7 +7483,6 @@ boost::statechart::result PG::RecoveryState::Active::react(const AdvMap& advmap)
     }
   }
 
-  bool need_publish = false;
   /* Check for changes in pool size (if the acting set changed as a result,
    * this does not matter) */
   if (advmap.lastmap->get_pg_size(pg->info.pgid.pgid) !=