osd/PG: fix repair_object when missing on primary

If the object is missing on the primary, we need to fully populate the
missing_loc.needs_recovery_map.  This broke with the recent refactoring of
recovery for EC, somewhere around 84e2f39c55.

Fixes: #8008
Signed-off-by: Sage Weil <sage@inktank.com>
This commit is contained in:
Sage Weil 2014-04-11 15:39:23 -07:00
parent 052519ed4a
commit 6ff645f592
2 changed files with 5 additions and 0 deletions

View File

@ -3449,6 +3449,7 @@ void PG::repair_object(
assert(waiting_for_unreadable_object.empty());
pg_log.missing_add(soid, oi.version, eversion_t());
missing_loc.add_missing(soid, oi.version, eversion_t());
missing_loc.add_location(soid, ok_peer);
pg_log.set_last_requested(0);

View File

@ -379,6 +379,10 @@ public:
}
}
}
void add_missing(const hobject_t &hoid, eversion_t need, eversion_t have) {
needs_recovery_map[hoid] = pg_missing_t::item(need, have);
}
void revise_need(const hobject_t &hoid, eversion_t need) {
assert(needs_recovery(hoid));
needs_recovery_map[hoid].need = need;