]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: fix STUCK_STALE check
authorSage Weil <sage@newdream.net>
Sat, 18 Feb 2012 00:34:49 +0000 (16:34 -0800)
committerJosh Durgin <josh.durgin@dreamhost.com>
Sat, 18 Feb 2012 00:34:35 +0000 (16:34 -0800)
Look at last_unstale if STALE bit is not set.

Signed-off-by: Sage Weil <sage@newdream.net>
src/mon/PGMap.cc

index 50a6d0072f70119dff1eebad98e0354a4dfb96b5..d961ac1b55e43347038366afd914702bbf0ef161 100644 (file)
@@ -508,7 +508,9 @@ void PGMap::get_stuck_stats(PGMap::StuckPG type, utime_t cutoff,
       val = i->second.last_clean;
       break;
     case STUCK_STALE:
-      val = i->second.last_fresh;
+      if ((i->second.state & PG_STATE_STALE) == 0)
+       continue;
+      val = i->second.last_unstale;
       break;
     default:
       assert(0 == "invalid type");