]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
osd/OSDMap: clean up primary selection
authorSage Weil <sage@redhat.com>
Mon, 13 Mar 2017 15:57:44 +0000 (11:57 -0400)
committerSage Weil <sage@redhat.com>
Sat, 25 Mar 2017 18:53:14 +0000 (14:53 -0400)
commite0b90d93c43b9418259fb02d6d3a93b53944da8d
treed15883795ded04925d512d7156e9bfa0589bcf63
parentd8d24be869d42ef739886fe2bfe65a72abfedde6
osd/OSDMap: clean up primary selection

_pg_to_raw_osds was selecting a primary, but it was generally
getting thrown out since _raw_to_up_osds was picking a *new*
primary after filtering out down and nonexistent osds.  Add a
_pick_primary helper to do it and call that explicitly in the
callers where it can be used by all.

Signed-off-by: Sage Weil <sage@redhat.com>
src/osd/OSDMap.cc
src/osd/OSDMap.h