There is no reason to put non-primary PGs on the scrub schedule as they
will be ignored when the worker comes around. This reduces lock
contention and is generally cleaner.
Signed-off-by: Guang Yang <yguang@yahoo-inc.com>
Signed-off-by: Sage Weil <sage@inktank.com>
} else {
scrubber.scrub_reg_stamp = info.history.last_scrub_stamp;
}
- osd->reg_last_pg_scrub(info.pgid, scrubber.scrub_reg_stamp);
+ if (is_primary())
+ osd->reg_last_pg_scrub(info.pgid, scrubber.scrub_reg_stamp);
}
void PG::unreg_next_scrub()
{
- osd->unreg_last_pg_scrub(info.pgid, scrubber.scrub_reg_stamp);
+ if (is_primary())
+ osd->unreg_last_pg_scrub(info.pgid, scrubber.scrub_reg_stamp);
}
void PG::sub_op_scrub_map(OpRequestRef op)