mirror of
https://github.com/ceph/ceph
synced 2025-02-06 02:14:01 +00:00
osd: recover_primary() until primary has all found objects
The logic in that if was effectively reversed. Signed-off-by: Sage Weil <sage@newdream.net>
This commit is contained in:
parent
7ea7a43584
commit
5452dae6f9
@ -3625,21 +3625,19 @@ int ReplicatedPG::start_recovery_ops(int max)
|
||||
{
|
||||
int started = 0;
|
||||
assert(is_primary());
|
||||
|
||||
size_t m_sz = missing.missing.size();
|
||||
if (m_sz == 0) {
|
||||
|
||||
int num_missing = missing.num_missing();
|
||||
int num_unfound = get_num_unfound();
|
||||
|
||||
if (num_missing == 0) {
|
||||
info.last_complete = info.last_update;
|
||||
}
|
||||
|
||||
size_t ml_sz = missing_loc.size();
|
||||
assert(m_sz >= ml_sz);
|
||||
|
||||
if (m_sz == ml_sz) {
|
||||
if (num_missing == num_unfound) {
|
||||
// All of the missing objects we have are unfound.
|
||||
// Recover the replicas.
|
||||
started = recover_replicas(max);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
// We still have missing objects that we should grab from replicas.
|
||||
started = recover_primary(max);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user