osd: explicitly requeue waiting_for_map in on_change()

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>
This commit is contained in:
Sage Weil 2012-08-15 17:19:22 -07:00
parent fac699cf41
commit da210bee09

View 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();