From b3b811958506798fe501ade4a4373c8e941dede8 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Sun, 17 Sep 2017 18:11:35 -0500 Subject: [PATCH] osd/PG: move a few assertions, flag change into start_recovery_ops() Signed-off-by: Sage Weil --- src/osd/OSD.cc | 6 ------ src/osd/PrimaryLogPG.cc | 5 +++++ 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index 55d80ebab96..4c21f392d57 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -8841,12 +8841,6 @@ void OSD::do_recovery( goto out; } - assert(!pg->is_deleting()); - assert(pg->is_peered() && pg->is_primary()); - - assert(pg->recovery_queued); - pg->recovery_queued = false; - dout(10) << "do_recovery starting " << reserved_pushes << " " << *pg << dendl; #ifdef DEBUG_RECOVERY_OIDS dout(20) << " active was " << service.recovery_oids[pg->pg_id] << dendl; diff --git a/src/osd/PrimaryLogPG.cc b/src/osd/PrimaryLogPG.cc index 45ed663e734..bcf07ed20b2 100644 --- a/src/osd/PrimaryLogPG.cc +++ b/src/osd/PrimaryLogPG.cc @@ -11083,6 +11083,11 @@ bool PrimaryLogPG::start_recovery_ops( started = 0; bool work_in_progress = false; assert(is_primary()); + assert(is_peered()); + assert(!is_deleting()); + + assert(recovery_queued); + recovery_queued = false; if (!state_test(PG_STATE_RECOVERING) && !state_test(PG_STATE_BACKFILLING)) { -- 2.39.5