This properly spreads the real value to peon monitors -- they weren't
seeing the right values at all before.
Initialize all related values to zero so that it's obvious if they
somehow avoided becoming set properly.
This doesn't require any kind of protocol revision, luckily -- mixing
monitors from before and after this change might result in extra work
recalculating full sets, but it won't spread bad values or anything.
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
assert(inc.version == version+1);
version++;
bool ratios_changed = false;
- if (inc.full_ratio != 0) {
+ if (inc.full_ratio != 0 && inc.full_ratio != full_ratio) {
full_ratio = inc.full_ratio;
ratios_changed = true;
}
- if (inc.nearfull_ratio != 0) {
+ if (inc.nearfull_ratio != 0 && inc.nearfull_ratio != nearfull_ratio) {
nearfull_ratio = inc.nearfull_ratio;
ratios_changed = true;
}
PGMap()
: version(0),
last_osdmap_epoch(0), last_pg_scan(0),
- full_ratio(.8), nearfull_ratio(.9),
+ full_ratio(0), nearfull_ratio(0),
num_pg(0),
num_osd(0)
{}
{
pending_inc = PGMap::Incremental();
pending_inc.version = pg_map.version + 1;
+ pending_inc.full_ratio = pg_map.full_ratio;
+ pending_inc.nearfull_ratio = pg_map.nearfull_ratio;
dout(10) << "create_pending v " << pending_inc.version << dendl;
}