From 5d5a42bc71f207f80c0fe80dde4caa63c7cda97f Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Fri, 21 Dec 2012 11:44:35 -0800 Subject: [PATCH] osd: clear CLEAN on exit from Clean state This means we can drop the scrub repair state_clear() call. We probably can drop others, but lets leave that for another day. Signed-off-by: Sage Weil --- src/osd/PG.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/osd/PG.cc b/src/osd/PG.cc index 036cca5e94771..89994f0c03322 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -4169,7 +4169,6 @@ void PG::scrub_compare_maps() { osd->clog.error(ss); state_set(PG_STATE_INCONSISTENT); if (repair) { - state_clear(PG_STATE_CLEAN); for (map::iterator i = authoritative.begin(); i != authoritative.end(); i++) { @@ -5824,6 +5823,8 @@ PG::RecoveryState::Clean::Clean(my_context ctx) void PG::RecoveryState::Clean::exit() { context< RecoveryMachine >().log_exit(state_name, enter_time); + PG *pg = context< RecoveryMachine >().pg; + pg->state_clear(PG_STATE_CLEAN); } /*---------Active---------*/ -- 2.39.5