The fallback behavior was printing a promising message but then doing
a 'continue' and not actually scrubbing the object. Instead, fall back to
a less-bad auth inside be_select_auth_object.
Signed-off-by: Sage Weil <sage@redhat.com>
// invalid object info, probably corrupt
continue;
}
+
+ // note candidate in case we can't find anything better, because
+ // something is better than nothing. FIXME.
+ auth = j;
+ *auth_oi = oi;
+
uint64_t correct_size = be_get_ondisk_size(oi.size);
if (correct_size != i->second.size) {
// invalid size, probably corrupt
continue;
}
}
- dout(10) << __func__ << ": selecting osd " << j->first
- << " for obj " << obj
- << dendl;
- auth = j;
- *auth_oi = oi;
+ break;
}
+ dout(10) << __func__ << ": selecting osd " << auth->first
+ << " for obj " << obj
+ << " with oi " << *auth_oi
+ << dendl;
return auth;
}