]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: explicitly requeue waiting_for_map in on_change()
authorSage Weil <sage@inktank.com>
Thu, 16 Aug 2012 00:19:22 +0000 (17:19 -0700)
committerSage Weil <sage@inktank.com>
Thu, 16 Aug 2012 20:15:11 +0000 (13:15 -0700)
Since we are requeuing stuff anyway, do it all in the correct order. This
fixes a bug where take_waiters() comes along later (at activate_map time)
and puts waiting_for_map events at the front of the queue, in front of
e.g. waiting_for_missing.  This breaks ordering from the client's
perspective.

The convention should be: whenever you requeue, requeuing everything
that logically follows it first.

Fixes: #2947
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
src/osd/ReplicatedPG.cc

index 3e1b0dfbd0ed4cf6633815d6e8b72d54147f947d..3396511d37494d5a2b21628e5f5cfc6e46938840 100644 (file)
@@ -5772,6 +5772,10 @@ void ReplicatedPG::on_change()
 {
   dout(10) << "on_change" << dendl;
 
+  // requeue everything in the reverse order they should be
+  // reexamined.
+  requeue_ops(waiting_for_map);
+
   clear_scrub_reserved();
   scrub_clear_state();