]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/osd/pg: update info.stats
authorKefu Chai <kchai@redhat.com>
Fri, 8 Mar 2019 03:45:20 +0000 (11:45 +0800)
committerKefu Chai <kchai@redhat.com>
Fri, 22 Mar 2019 05:24:15 +0000 (13:24 +0800)
PG.info.stats is sent to mgr periodically for PG stats reporting,
also, it is sent to peer OSD in MOSDPGLog message when PG performs
peering. we need to keep it updated.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/crimson/osd/pg.cc

index 02da7e473d107e59b15ae5a9944de1f9e68244ed..98b87e61c4fd6911ef5929382d467342b5e52f0d 100644 (file)
@@ -56,6 +56,11 @@ seastar::future<> PG::read_state(ceph::os::CyanStore* store)
         update_primary_state(new_up, new_up_primary,
                              new_acting, new_acting_primary);
       }
+      info.stats.up = up;
+      info.stats.up_primary = up_primary.osd;
+      info.stats.acting = acting;
+      info.stats.acting_primary = primary.osd;
+      info.stats.mapping_epoch = info.history.same_interval_since;
       return seastar::now();
     });
 }