diff options
author | Sage Weil <sage@inktank.com> | 2012-08-21 19:35:37 +0200 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2012-08-21 19:48:48 +0200 |
commit | 4a0704e64a733b7bb14fb4103cd1cd54e4e7da8a (patch) | |
tree | e41ea3062520bd38084c7754a21e56187cf50f18 | |
parent | rgw: dump content_range using 64 bit formatters (diff) | |
download | ceph-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.cc | 4 |
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(); |