From 342852639adc84a10769deeaa140cbd02d68114b Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Sat, 9 May 2009 22:13:37 -0700 Subject: [PATCH] osd: based reported eversion in pg_stat_t on same_primary_since This ensures the value increases when the primary changes. --- src/osd/PG.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/osd/PG.cc b/src/osd/PG.cc index 58df608b74e8f..45a6091b8795f 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -1572,7 +1572,7 @@ void PG::update_stats() pg_stats_lock.Lock(); if (is_primary()) { // update our stat summary - info.stats.reported.inc(osd->osdmap->get_epoch()); + info.stats.reported.inc(info.history.same_primary_since); info.stats.version = info.last_update; pg_stats_valid = true; pg_stats_stable = info.stats; -- 2.39.5