Skip to content

Commit

Permalink
Merge pull request #18528 from tchaikov/wip-osd-misplaced
Browse files Browse the repository at this point in the history
osd/PG: fix calc of misplaced objects

Reviewed-by: David Zafman <dzafman@redhat.com>
Reviewed-by: Sage Weil <sage@redhat.com>
  • Loading branch information
dzafman committed Oct 25, 2017
2 parents 718496b + 84f74e5 commit e31075f
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/osd/PG.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2668,11 +2668,12 @@ void PG::_update_calc_stats()

// Add recovery objects not part of actingbackfill to be used to reduce
// degraded and account as misplaced.
for (auto i = peer_info.begin() ; i != peer_info.end() ; ++i) {
if (actingbackfill.find(i->first) == actingbackfill.end())
object_copies += i->second.stats.stats.sum.num_objects;
misplaced += i->second.stats.stats.sum.num_objects;
for (const auto& peer : peer_info) {
if (actingbackfill.find(peer.first) == actingbackfill.end()) {
object_copies += peer.second.stats.stats.sum.num_objects;
misplaced += peer.second.stats.stats.sum.num_objects;
++num_misplaced;
}
}
if (object_copies)
dout(20) << __func__ << " objects not part of up/acting " << object_copies << dendl;
Expand Down

0 comments on commit e31075f

Please sign in to comment.