From e7735d31efa5506f9aa04d39ccfba55e9458a96c Mon Sep 17 00:00:00 2001 From: Guang Yang Date: Fri, 13 Feb 2015 09:19:30 +0000 Subject: [PATCH] osd: number of degraded objects in EC pool is wrong when there is OSD down(in) With EC pool (crush rule choose indep), when there is an OSD down, the size of the 'acting' list does not change (CRUSH_ITEM_NONE is used to replace the down OSD), in this case, 'actingset' should be used to calculate the degraded objects. Signed-off-by: Guang Yang --- src/osd/PG.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/osd/PG.cc b/src/osd/PG.cc index 5d0a4fec6e204..aa9796f27c179 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -2300,8 +2300,8 @@ void PG::_update_calc_stats() uint64_t degraded = 0; // if acting is smaller than desired, add in those missing replicas - if (acting.size() < target) - degraded += (target - acting.size()) * num_objects; + if (actingset.size() < target) + degraded += (target - actingset.size()) * num_objects; // missing on primary info.stats.stats.sum.num_objects_missing_on_primary = -- 2.39.5