From 999846f7e944efb881309369ee4eb83cd3f7cac4 Mon Sep 17 00:00:00 2001 From: Samuel Just Date: Mon, 12 Dec 2011 17:25:40 -0800 Subject: [PATCH] PG: fix phantom entry in peer_info In GetLog, do not call pg->peer_info[newest_update_osd] if newest_update_osd is osd->whoami. Signed-off-by: Samuel Just --- src/osd/PG.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/osd/PG.cc b/src/osd/PG.cc index 2e6c108ead933..92b44e29690cf 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -4175,6 +4175,12 @@ PG::RecoveryState::GetLog::GetLog(my_context ctx) : return; } + // am i the best? + if (newest_update_osd == pg->osd->whoami) { + post_event(GotLog()); + return; + } + const Info& best = pg->peer_info[newest_update_osd]; // am i broken? @@ -4184,12 +4190,6 @@ PG::RecoveryState::GetLog::GetLog(my_context ctx) : return; } - // am i the best? - if (newest_update_osd == pg->osd->whoami) { - post_event(GotLog()); - return; - } - // how much log to request? eversion_t request_log_from = pg->info.last_update; for (vector::iterator p = pg->acting.begin() + 1; p != pg->acting.end(); ++p) { -- 2.39.5