]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: track last_undegraded pg stat
authorSage Weil <sage@redhat.com>
Tue, 1 Jul 2014 00:18:05 +0000 (17:18 -0700)
committerSage Weil <sage@redhat.com>
Sat, 16 Aug 2014 20:19:46 +0000 (13:19 -0700)
Signed-off-by: Sage Weil <sage@redhat.com>
src/osd/PG.cc

index 59e2be8e81e95f9929be8e5b194e27f0cfa19011..819a37b1267fcefe8053753a348819654d1ad1ae 100644 (file)
@@ -2334,6 +2334,8 @@ void PG::publish_stats_to_osd()
     if (info.stats.state & PG_STATE_ACTIVE)
       info.stats.last_active = now;
     info.stats.last_unstale = now;
+    if ((info.stats.state & PG_STATE_DEGRADED) == 0)
+      info.stats.last_undegraded = now;
 
     _update_calc_stats();
     _update_blocked_by();