mirror of
https://github.com/ceph/ceph
synced 2025-04-01 23:02:17 +00:00
OSD::calc_priors_during: fix confusing for loop bracing (cosmetic)
Confusing lack of braces is confusing. Signed-off-by: Samuel Just <sam.just@inktank.com>
This commit is contained in:
parent
3261caadc6
commit
d76936b923
@ -2562,7 +2562,7 @@ void OSD::calc_priors_during(
|
|||||||
oldmap->pg_to_acting_osds(pgid.pgid, acting);
|
oldmap->pg_to_acting_osds(pgid.pgid, acting);
|
||||||
dout(20) << " " << pgid << " in epoch " << e << " was " << acting << dendl;
|
dout(20) << " " << pgid << " in epoch " << e << " was " << acting << dendl;
|
||||||
int up = 0;
|
int up = 0;
|
||||||
for (unsigned i=0; i<acting.size(); i++)
|
for (unsigned i=0; i<acting.size(); i++) {
|
||||||
if (osdmap->is_up(acting[i])) {
|
if (osdmap->is_up(acting[i])) {
|
||||||
if (acting[i] != whoami) {
|
if (acting[i] != whoami) {
|
||||||
pset.insert(
|
pset.insert(
|
||||||
@ -2572,16 +2572,19 @@ void OSD::calc_priors_during(
|
|||||||
}
|
}
|
||||||
up++;
|
up++;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (!up && !acting.empty()) {
|
if (!up && !acting.empty()) {
|
||||||
// sucky. add down osds, even tho we can't reach them right now.
|
// sucky. add down osds, even tho we can't reach them right now.
|
||||||
for (unsigned i=0; i<acting.size(); i++)
|
for (unsigned i=0; i<acting.size(); i++) {
|
||||||
if (acting[i] != whoami)
|
if (acting[i] != whoami) {
|
||||||
pset.insert(
|
pset.insert(
|
||||||
pg_shard_t(
|
pg_shard_t(
|
||||||
acting[i],
|
acting[i],
|
||||||
osdmap->pg_is_ec(pgid.pgid) ? shard_id_t(i) : shard_id_t::NO_SHARD));
|
osdmap->pg_is_ec(pgid.pgid) ? shard_id_t(i) : shard_id_t::NO_SHARD));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
dout(10) << "calc_priors_during " << pgid
|
dout(10) << "calc_priors_during " << pgid
|
||||||
<< " [" << start << "," << end
|
<< " [" << start << "," << end
|
||||||
<< ") = " << pset << dendl;
|
<< ") = " << pset << dendl;
|
||||||
|
Loading…
Reference in New Issue
Block a user