PG *pg = _lookup_lock_pg(pgid);
if (pg) {
- if (pg->is_active() &&
+ if (pg->get_pgbackend()->scrub_supported() && pg->is_active() &&
(load_is_low ||
(double)diff >= cct->_conf->osd_scrub_max_interval ||
pg->scrubber.must_scrub)) {
*/
void PG::classic_scrub(ThreadPool::TPHandle &handle)
{
+ assert(pool.info.type == pg_pool_t::TYPE_REPLICATED);
if (!scrubber.active) {
dout(10) << "scrub start" << dendl;
scrubber.active = true;
* 1) Handling client operations
* 2) Handling object recovery
* 3) Handling object access
+ * 4) Handling scrub, deep-scrub, repair
*/
class PGBackend {
public:
const list<pair<pair<uint64_t, uint64_t>,
pair<bufferlist*, Context*> > > &to_read,
Context *on_complete) = 0;
+
+ virtual bool scrub_supported() { return false; }
};
#endif