summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSage Weil <sage@inktank.com>2012-08-21 19:35:37 +0200
committerSage Weil <sage@inktank.com>2012-08-21 19:48:48 +0200
commit4a0704e64a733b7bb14fb4103cd1cd54e4e7da8a (patch)
treee41ea3062520bd38084c7754a21e56187cf50f18
parentrgw: dump content_range using 64 bit formatters (diff)
downloadceph-4a0704e64a733b7bb14fb4103cd1cd54e4e7da8a.tar.xz
ceph-4a0704e64a733b7bb14fb4103cd1cd54e4e7da8a.zip
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 <sage@inktank.com> Reviewed-by: Samuel Just <sam.just@inktank.com>
-rw-r--r--src/osd/ReplicatedPG.cc4
1 files changed, 2 insertions, 2 deletions
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<eversion_t, list<OpRequestRef> >::iterator p = waiting_for_ondisk.begin();
- p != waiting_for_ondisk.end();
+ for (map<eversion_t, list<OpRequestRef> >::reverse_iterator p = waiting_for_ondisk.rbegin();
+ p != waiting_for_ondisk.rend();
p++)
requeue_ops(p->second);
waiting_for_ondisk.clear();