]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: clear CLEAN on exit from Clean state
authorSage Weil <sage@inktank.com>
Fri, 21 Dec 2012 19:44:35 +0000 (11:44 -0800)
committerSage Weil <sage@inktank.com>
Fri, 21 Dec 2012 21:10:32 +0000 (13:10 -0800)
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 <sage@inktank.com>
src/osd/PG.cc

index 036cca5e94771f4dc88b7f01341a551511d3ed4e..89994f0c03322ebcf0c928e5f8d9e797524ba876 100644 (file)
@@ -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<hobject_t, int>::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---------*/