]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
filestore: fix wake condition when journal submission blocks
authorSage Weil <sage@newdream.net>
Mon, 3 Jan 2011 21:14:13 +0000 (13:14 -0800)
committerSage Weil <sage@newdream.net>
Mon, 3 Jan 2011 21:14:13 +0000 (13:14 -0800)
We only want to wake up if we are at the front of the line, in order to
preserve journal submission pipeline ordering.

This fixes, among other things, messages in the log like

2010-12-21 10:38:42.515974 7f0861486700 journal op_submit_finish 5364 expected 5370, OUT OF ORDER

and bug #666.

Signed-off-by: Sage Weil <sage@newdream.net>
src/os/JournalingObjectStore.cc

index 60165a189cabedd1201640ca5c3cefeeeb14916d..6e72932a6f61f33e166e02c69eedbdcffc44b6d9 100644 (file)
@@ -106,7 +106,7 @@ uint64_t JournalingObjectStore::_op_apply_start(uint64_t op)
     Cond cond;
     ops_apply_blocked.push_back(&cond);
     dout(10) << "op_apply_start " << op << " blocked (getting in back of line)" << dendl;
-    while (blocked)
+    while (blocked && ops_apply_blocked.front() != &cond)
       cond.Wait(journal_lock);
     dout(10) << "op_apply_start " << op << " woke (at front of line)" << dendl;
     ops_apply_blocked.pop_front();