]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: update pg degraded stats only when active
authorSage Weil <sage@newdream.net>
Mon, 22 Dec 2008 06:40:46 +0000 (22:40 -0800)
committerSage Weil <sage@newdream.net>
Mon, 22 Dec 2008 18:10:49 +0000 (10:10 -0800)
peer_missing needs to be defined.

src/osd/PG.cc

index c51f75fce2b176418147a9f2c846ffb41bbb53d0..b9e134e046477f256077361a14f407df49186314 100644 (file)
@@ -1540,7 +1540,7 @@ void PG::update_stats()
     pg_stats_stable.acting = acting;
 
     pg_stats_stable.num_object_copies = pg_stats_stable.num_objects * info.pgid.size();
-    if (!is_clean() && !is_peering()) {
+    if (!is_clean() && is_active()) {
       pg_stats_stable.num_objects_missing_on_primary = missing.num_missing();
       int degraded = missing.num_missing();
       for (unsigned i=1; i<acting.size(); i++) {