Skip to content

Commit

Permalink
osd/OSDMap: Replace get_out_osds with get_out_existing_osds
Browse files Browse the repository at this point in the history
Fixes: http://tracker.ceph.com/issues/39154

Signed-off-by: Brad Hubbard <bhubbard@redhat.com>
(cherry picked from commit adfb6a5)

Conflicts:
	src/osd/OSDMap.h : Resovled for get_out_existing_osds
  • Loading branch information
badone authored and Prashant D committed Jun 11, 2019
1 parent 9537302 commit c596e8f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/mon/OSDMonitor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9762,7 +9762,7 @@ bool OSDMonitor::prepare_command_impl(MonOpRequestRef op,
(idvec[0] == "any" || idvec[0] == "all" || idvec[0] == "*")) {
if (prefix == "osd in") {
// touch out osds only
osdmap.get_out_osds(osds);
osdmap.get_out_existing_osds(osds);
} else {
osdmap.get_all_osds(osds);
}
Expand Down
4 changes: 2 additions & 2 deletions src/osd/OSDMap.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1274,10 +1274,10 @@ void OSDMap::get_up_osds(set<int32_t>& ls) const
}
}

void OSDMap::get_out_osds(set<int32_t>& ls) const
void OSDMap::get_out_existing_osds(set<int32_t>& ls) const
{
for (int i = 0; i < max_osd; i++) {
if (is_out(i))
if (exists(i) && get_weight(i) == CEPH_OSD_OUT)
ls.insert(i);
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/osd/OSDMap.h
Original file line number Diff line number Diff line change
Expand Up @@ -699,7 +699,7 @@ class OSDMap {

void get_all_osds(set<int32_t>& ls) const;
void get_up_osds(set<int32_t>& ls) const;
void get_out_osds(set<int32_t>& ls) const;
void get_out_existing_osds(std::set<int32_t>& ls) const;
unsigned get_num_pg_temp() const {
return pg_temp->size();
}
Expand Down

0 comments on commit c596e8f

Please sign in to comment.