From 6ff645f592cd82f888b3646e10438aea781370a2 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Fri, 11 Apr 2014 15:39:23 -0700 Subject: [PATCH] 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 84e2f39c557c79e9ca7c3c3f0eb0bfa4860bf899. Fixes: #8008 Signed-off-by: Sage Weil --- src/osd/PG.cc | 1 + src/osd/PG.h | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/src/osd/PG.cc b/src/osd/PG.cc index ae9732c563168..5a79ab98ba95e 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -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); diff --git a/src/osd/PG.h b/src/osd/PG.h index 6ca554f5af59d..58585dfe12cac 100644 --- a/src/osd/PG.h +++ b/src/osd/PG.h @@ -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; -- 2.39.5