]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
FileStore.h: reorder queue operations in _journaled_ahead
authorSamuel Just <samuel.just@dreamhost.com>
Thu, 24 Feb 2011 20:31:58 +0000 (12:31 -0800)
committerSage Weil <sage.weil@dreamhost.com>
Fri, 25 Feb 2011 22:43:05 +0000 (14:43 -0800)
In writeahead mode, an op could dissappear from jq without immediately
reappearing in q.  Thus, q can be empty before seq is requeued and
finished.  _journaled_ahead will now enqueue the op in q before removing
from jq.

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
src/os/FileStore.cc

index dd4181885dffd0fc1446c72aab74fa5292e1d60c..2ee08ab1126d9c7f0c6ddb8e18d166c6d390b331 100644 (file)
@@ -1664,13 +1664,14 @@ void FileStore::_journaled_ahead(OpSequencer *osr, uint64_t op,
 
   op_queue_throttle();
 
-  osr->dequeue_journal();
 
   // this should queue in order because the journal does it's completions in order.
   journal_lock.Lock();
   queue_op(osr, op, tls, onreadable, onreadable_sync);
   journal_lock.Unlock();
 
+  osr->dequeue_journal();
+
   // do ondisk completions async, to prevent any onreadable_sync completions
   // getting blocked behind an ondisk completion.
   if (ondisk) {