From: Li Wang Date: Tue, 10 Nov 2015 08:21:54 +0000 (+0800) Subject: osd: fix trivial bug X-Git-Tag: v10.0.1~84^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F6517%2Fhead;p=ceph.git osd: fix trivial bug Signed-off-by: Li Wang Reported-by: Jie Wang --- diff --git a/src/osd/PG.cc b/src/osd/PG.cc index 8a50060e6179..0265eb25c9f9 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -2525,7 +2525,6 @@ void PG::publish_stats_to_osd() utime_t now = ceph_clock_now(cct); if (info.stats.state != state) { - info.stats.state = state; info.stats.last_change = now; if ((state & PG_STATE_ACTIVE) && !(info.stats.state & PG_STATE_ACTIVE)) @@ -2533,6 +2532,7 @@ void PG::publish_stats_to_osd() if ((state & (PG_STATE_ACTIVE|PG_STATE_PEERED)) && !(info.stats.state & (PG_STATE_ACTIVE|PG_STATE_PEERED))) info.stats.last_became_peered = now; + info.stats.state = state; } _update_calc_stats();