From: Sage Weil Date: Thu, 16 Aug 2012 00:19:11 +0000 (-0700) Subject: osd: simplify how in-progress ops are requeued X-Git-Tag: v0.51~13 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=fac699cf41e3c1eb0dae40df4fad0e78fbce0490;p=ceph.git osd: simplify how in-progress ops are requeued Requeue them explicity from apply_and_flush_repops() and call it last, so that the overall ordering is preserved. Signed-off-by: Sage Weil Reviewed-by: Samuel Just --- diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc index 1d4abf99ff5d..3e1b0dfbd0ed 100644 --- a/src/osd/ReplicatedPG.cc +++ b/src/osd/ReplicatedPG.cc @@ -5737,7 +5737,7 @@ void ReplicatedPG::apply_and_flush_repops(bool requeue) } if (requeue) { - waiting_for_map.splice(waiting_for_map.end(), rq); + requeue_ops(rq); } } @@ -5771,14 +5771,13 @@ void ReplicatedPG::on_activate() void ReplicatedPG::on_change() { dout(10) << "on_change" << dendl; - apply_and_flush_repops(is_primary()); clear_scrub_reserved(); scrub_clear_state(); context_registry_on_change(); - // take object waiters + // requeue object waiters requeue_object_waiters(waiting_for_missing_object); for (map >::iterator p = waiting_for_degraded_object.begin(); p != waiting_for_degraded_object.end(); @@ -5786,9 +5785,13 @@ void ReplicatedPG::on_change() requeue_ops(p->second); finish_degraded_object(p->first); } + requeue_ops(waiting_for_all_missing); waiting_for_all_missing.clear(); + // this will requeue ops we were working on but didn't finish + apply_and_flush_repops(is_primary()); + // clear pushing/pulling maps pushing.clear(); pulling.clear();