From 17d5ff6bba5635e98e1a1cba7e9a6aa6c5613fce Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Tue, 16 Dec 2008 13:37:11 -0800 Subject: [PATCH] osd: fix pg stat reporting We were skipping pgs that weren't active instead of not primary. --- src/osd/OSD.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index 49fc8c849b1a0..0fb4995538989 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -1325,7 +1325,7 @@ void OSD::send_pg_stats() while (!p.end()) { PG *pg = *p; ++p; - if (!pg->is_active()) { + if (!pg->is_primary()) { // we hold map_lock; role is stable. pg->stat_queue_item.remove_myself(); pg->put(); continue; @@ -1334,6 +1334,8 @@ void OSD::send_pg_stats() if (pg->pg_stats_valid) { m->pg_stat[pg->info.pgid] = pg->pg_stats_stable; dout(25) << " sending " << pg->info.pgid << " " << pg->pg_stats_stable.reported << dendl; + } else { + dout(25) << " NOT sending " << pg->info.pgid << " " << pg->pg_stats_stable.reported << ", not valid" << dendl; } pg->pg_stats_lock.Unlock(); } -- 2.39.5