From: Guang Yang Date: Fri, 13 Feb 2015 09:19:30 +0000 (+0000) Subject: osd: number of degraded objects in EC pool is wrong when there is OSD down(in) X-Git-Tag: v0.93~19^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=e7735d31efa5506f9aa04d39ccfba55e9458a96c;p=ceph.git 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 --- diff --git a/src/osd/PG.cc b/src/osd/PG.cc index 5d0a4fec6e20..aa9796f27c17 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 =