Skip to content

Commit

Permalink
OSDMap::_apply_primary_affinity: skip CRUSH_ITEM_NONE in non-default …
Browse files Browse the repository at this point in the history
…check

Fixes: ceph#7482
Signed-off-by: Samuel Just <[email protected]>
Reviewed-by: David Zafman <[email protected]>
  • Loading branch information
Samuel Just committed Feb 20, 2014
1 parent b3bb9ef commit aa110af
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/osd/OSDMap.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1426,7 +1426,8 @@ void OSDMap::_apply_primary_affinity(ps_t seed,

bool any = false;
for (vector<int>::const_iterator p = osds->begin(); p != osds->end(); ++p) {
if ((*osd_primary_affinity)[*p] != CEPH_OSD_DEFAULT_PRIMARY_AFFINITY) {
if (*p != CRUSH_ITEM_NONE &&
(*osd_primary_affinity)[*p] != CEPH_OSD_DEFAULT_PRIMARY_AFFINITY) {
any = true;
}
}
Expand Down

0 comments on commit aa110af

Please sign in to comment.