}
enum scrub_error_type PGBackend::be_compare_scrub_objects(
+ pg_shard_t auth_shard,
const ScrubMap::object &auth,
+ const object_info_t& auth_oi,
const ScrubMap::object &candidate,
ostream &errorstream)
{
map<pg_shard_t, ScrubMap *>::const_iterator
PGBackend::be_select_auth_object(
const hobject_t &obj,
- const map<pg_shard_t,ScrubMap*> &maps)
+ const map<pg_shard_t,ScrubMap*> &maps,
+ object_info_t *auth_oi)
{
map<pg_shard_t, ScrubMap *>::const_iterator auth = maps.end();
for (map<pg_shard_t, ScrubMap *>::const_iterator j = maps.begin();
dout(10) << __func__ << ": selecting osd " << j->first
<< " for obj " << obj
<< dendl;
+ *auth_oi = oi;
auth = j;
}
return auth;
for (set<hobject_t>::const_iterator k = master_set.begin();
k != master_set.end();
++k) {
+ object_info_t auth_oi;
map<pg_shard_t, ScrubMap *>::const_iterator auth =
- be_select_auth_object(*k, maps);
+ be_select_auth_object(*k, maps, &auth_oi);
if (auth == maps.end()) {
// Something is better than nothing
// TODO: something is NOT better than nothing, do something like
if (j->second->objects.count(*k)) {
// Compare
stringstream ss;
- enum scrub_error_type error = be_compare_scrub_objects(auth->second->objects[*k],
- j->second->objects[*k],
- ss);
+ enum scrub_error_type error =
+ be_compare_scrub_objects(auth->first,
+ auth->second->objects[*k],
+ auth_oi,
+ j->second->objects[*k],
+ ss);
if (error != CLEAN) {
cur_inconsistent.insert(j->first);
if (error == SHALLOW_ERROR)
ScrubMap &map, const vector<hobject_t> &ls, bool deep, uint32_t seed,
ThreadPool::TPHandle &handle);
enum scrub_error_type be_compare_scrub_objects(
+ pg_shard_t auth_shard,
const ScrubMap::object &auth,
+ const object_info_t& auth_oi,
const ScrubMap::object &candidate,
ostream &errorstream);
map<pg_shard_t, ScrubMap *>::const_iterator be_select_auth_object(
const hobject_t &obj,
- const map<pg_shard_t,ScrubMap*> &maps);
+ const map<pg_shard_t,ScrubMap*> &maps,
+ object_info_t *auth_oi);
void be_compare_scrubmaps(
const map<pg_shard_t,ScrubMap*> &maps,
map<hobject_t, set<pg_shard_t> > &missing,