From: Sage Weil Date: Tue, 21 Aug 2012 17:35:37 +0000 (-0700) Subject: osd: fix requeue order for waiting_for_ondisk X-Git-Tag: v0.51~5 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=4a0704e64a733b7bb14fb4103cd1cd54e4e7da8a;p=ceph.git osd: fix requeue order for waiting_for_ondisk We are calling requeue_ops() on each individual op, which means we need to requeue in reverse order (newest first, oldest last). Fixes: #2947 Signed-off-by: Sage Weil Reviewed-by: Samuel Just --- diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc index 296bffb4387..d9f86853982 100644 --- a/src/osd/ReplicatedPG.cc +++ b/src/osd/ReplicatedPG.cc @@ -5795,8 +5795,8 @@ void ReplicatedPG::on_change() // take commit waiters; these are dups of what // apply_and_flush_repops() will requeue. - for (map >::iterator p = waiting_for_ondisk.begin(); - p != waiting_for_ondisk.end(); + for (map >::reverse_iterator p = waiting_for_ondisk.rbegin(); + p != waiting_for_ondisk.rend(); p++) requeue_ops(p->second); waiting_for_ondisk.clear();