]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/PG: update info.stats.* mappings on split 9001/head
authorSage Weil <sage@redhat.com>
Fri, 29 Apr 2016 19:24:09 +0000 (15:24 -0400)
committerVicente Cheng <freeze.bilsted@gmail.com>
Mon, 9 May 2016 15:32:59 +0000 (23:32 +0800)
These are updated in the init and start_peering_interval paths, but not
on split.

Fixes: http://tracker.ceph.com/issues/15523
Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit 8b42294d98dd70715184991da5ba495fbe93d009)

src/osd/PG.cc

index 7917638b1e7248def5725e0247ce973e03f8aff5..dd3628c93139d93575252cf9905cebf7ac095200 100644 (file)
@@ -2214,6 +2214,12 @@ void PG::split_into(pg_t child_pgid, PG *child, unsigned split_bits)
   if (get_primary() != child->get_primary())
     child->info.history.same_primary_since = get_osdmap()->get_epoch();
 
+  child->info.stats.up = up;
+  child->info.stats.up_primary = up_primary;
+  child->info.stats.acting = acting;
+  child->info.stats.acting_primary = primary;
+  child->info.stats.mapping_epoch = get_osdmap()->get_epoch();
+
   // History
   child->past_intervals = past_intervals;