From: Sage Weil Date: Fri, 11 Apr 2014 22:39:23 +0000 (-0700) Subject: osd/PG: fix repair_object when missing on primary X-Git-Tag: v0.80-rc1~53^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=6ff645f592cd82f888b3646e10438aea781370a2;p=ceph.git 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 --- 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;