From d78e67885529726368544ecbdc8b2060240a921b Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Fri, 28 Mar 2014 13:10:06 -0700 Subject: [PATCH] osd/PG: fix choose_acting revert to up case If we decide to revert back to up, we need to 1- return false, so that we go into the NeedActingChange state, and 2- actually ask for that change. It's too fugly to try to jump down to the existing queue_want_pg_temp call 100+ lines down in this function, so just do it here. We already know that we are requesting to clear the pg_temp. Fixes: #7902 Backport: emperor, dumpling Signed-off-by: Sage Weil --- src/osd/PG.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/osd/PG.cc b/src/osd/PG.cc index 1b18d83ec5932..fab6981688f74 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -1163,12 +1163,13 @@ bool PG::choose_acting(pg_shard_t &auth_log_shard_id) dout(10) << "choose_acting no suitable info found (incomplete backfills?)," << " reverting to up" << dendl; want_acting = up; - return true; + vector empty; + osd->queue_want_pg_temp(info.pgid.pgid, empty); } else { dout(10) << "choose_acting failed" << dendl; assert(want_acting.empty()); - return false; } + return false; } if ((up.size() && -- 2.39.5