From d28698ba64f1cde9bf8d2397a81b0d0520408715 Mon Sep 17 00:00:00 2001 From: Li Wang Date: Tue, 10 Nov 2015 16:21:54 +0800 Subject: [PATCH] osd: fix trivial bug Signed-off-by: Li Wang Reported-by: Jie Wang --- 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 8a50060e61790..0265eb25c9f90 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(); -- 2.39.5