void _request_scrub_map(int replica, eversion_t version);
void build_scrub_map(ScrubMap &map);
void build_inc_scrub_map(ScrubMap &map, eversion_t v);
- virtual int _scrub(ScrubMap &map, int& errors, int& fixed) { return 0; }
+ virtual int _scrub(ScrubMap &map, int* errors, int* fixed) { return 0; }
virtual coll_t get_temp_coll() = 0;
virtual bool have_temp_coll() = 0;
void clear_scrub_reserved();
// SCRUB
-int ReplicatedPG::_scrub(ScrubMap& scrubmap, int& errors, int& fixed)
+int ReplicatedPG::_scrub(ScrubMap& scrubmap, int* errors, int* fixed)
{
dout(10) << "_scrub" << dendl;
if (p->second.attrs.count(SS_ATTR) == 0) {
osd->clog.error() << mode << " " << info.pgid << " " << soid
<< " no '" << SS_ATTR << "' attr";
- errors++;
+ ++(*errors);
continue;
}
bufferlist bl;
if (head != hobject_t()) {
osd->clog.error() << mode << " " << info.pgid << " " << head
<< " missing clones";
- errors++;
+ ++(*errors);
}
// what will be next?
if (p->second.attrs.count(OI_ATTR) == 0) {
osd->clog.error() << mode << " " << info.pgid << " " << soid
<< " no '" << OI_ATTR << "' attr";
- errors++;
+ ++(*errors);
continue;
}
bufferlist bv;
osd->clog.error() << mode << " " << info.pgid << " " << soid
<< " on disk size (" << p->second.size
<< ") does not match object info size (" << oi.size << ")";
- ++errors;
+ ++(*errors);
}
dout(20) << mode << " " << soid << " " << oi << dendl;
if (!snapset.head_exists) {
osd->clog.error() << mode << " " << info.pgid << " " << soid
<< " snapset.head_exists=false, but object exists";
- errors++;
+ ++(*errors);
continue;
}
} else if (soid.snap) {
if (soid.snap != *curclone) {
osd->clog.error() << mode << " " << info.pgid << " " << soid
<< " expected clone " << *curclone;
- ++errors;
+ ++(*errors);
assert(soid.snap == *curclone);
}
<< cstat.sum.num_objects << "/" << info.stats.stats.sum.num_objects << " objects, "
<< cstat.sum.num_object_clones << "/" << info.stats.stats.sum.num_object_clones << " clones, "
<< cstat.sum.num_bytes << "/" << info.stats.stats.sum.num_bytes << " bytes.\n";
- errors++;
+ ++(*errors);
if (repair) {
- fixed++;
+ ++(*fixed);
info.stats.stats = cstat;
update_stats();
share_pg_info();
}
dout(10) << "_scrub (" << mode << ") finish" << dendl;
- return errors;
+ return (*errors);
}
/*---SnapTrimmer Logging---*/