Skip to content

Commit

Permalink
Merge pull request ceph#55404 from JoshSalomon/fix-warn
Browse files Browse the repository at this point in the history
osd: Fix compilation warnings for PR ceph#55198
  • Loading branch information
ljflores authored Feb 16, 2024
2 parents f50f7fd + 67464df commit 2991620
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/osd/OSDMap.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5347,8 +5347,8 @@ int OSDMap::calc_desired_primary_distribution_osdsize_opt(
}
int write_ratio = 100 - read_ratio;
ldout(cct, 30) << __func__ << " Pool: " << pid << " read ratio: " << read_ratio << " write ratio: " << write_ratio << dendl;
auto num_osds = osds.size();
if (pg_num != (pool->get_pgp_num_mask() + 1)) {
int num_osds = osds.size();
if (pg_num != int((pool->get_pgp_num_mask() + 1))) {
// TODO: handle pgs with different sizes
//pool_t op: unsigned get_pg_num_divisor(pg_t pgid) const;
ldout(cct, 10) << __func__ << " number of PGs for pool '"
Expand Down Expand Up @@ -6457,7 +6457,7 @@ int OSDMap::calc_rbs_fair(CephContext *cct, OSDMap& tmp_osd_map, int64_t pool_id
}
}

auto num_osds = pgs_by_osd.size();
int num_osds = pgs_by_osd.size();

float avg_prims_per_osd = (float)num_pgs / (float)num_osds;
uint64_t max_prims_per_osd = 0;
Expand Down Expand Up @@ -6592,8 +6592,8 @@ int OSDMap::calc_rbs_size_optimal(CephContext *cct, OSDMap& tmp_osd_map, int64_t
pgs_by_osd = tmp_osd_map.get_pgs_by_osd(cct, pool_id, &prim_pgs_by_osd, &acting_prims_by_osd);
auto num_osds = pgs_by_osd.size();
int64_t num_pg_osd_legs = 0;
for (auto i = 0 ; i < num_osds ; i++) {
if (get_primary_affinity(i) != CEPH_OSD_DEFAULT_PRIMARY_AFFINITY) {
for (uint64_t i = 0 ; i < num_osds ; i++) {
if (get_primary_affinity(int(i)) != CEPH_OSD_DEFAULT_PRIMARY_AFFINITY) {
if (cct != nullptr) {
ldout(cct, 30) << __func__ << " pool " << pool_id
<< " has primary_affinity set to non-default value on some OSDs" << dendl;
Expand Down

0 comments on commit 2991620

Please sign in to comment.