]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
FileStore.cc: onreadable callbacks in OpSequencer order is enough
authorSamuel Just <samuel.just@dreamhost.com>
Thu, 17 Nov 2011 21:45:08 +0000 (13:45 -0800)
committerSamuel Just <samuel.just@dreamhost.com>
Fri, 18 Nov 2011 23:56:59 +0000 (15:56 -0800)
Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
src/os/FileStore.cc
src/os/FileStore.h

index e135fa32b9702e47dd51d65bad87fc90fe5d510f..3c64620f1bc25224c2c359ec99be7a12a8f47f8d 100644 (file)
@@ -1928,35 +1928,11 @@ void FileStore::_finish_op(OpSequencer *osr)
   lat -= o->start;
   logger->finc(l_os_apply_lat, lat);
 
-  if (next_finish == o->op) {
-    dout(10) << "_finish_op " << o->op << " next_finish " << next_finish
-            << " queueing " << o->onreadable << " doing " << o->onreadable_sync << dendl;
-    next_finish++;
-    if (o->onreadable_sync) {
-      o->onreadable_sync->finish(0);
-      delete o->onreadable_sync;
-    }
-    op_finisher.queue(o->onreadable);
-
-    while (finish_queue.begin()->first == next_finish) {
-      Context *c = finish_queue.begin()->second.first;
-      Context *s = finish_queue.begin()->second.second;
-      finish_queue.erase(finish_queue.begin());
-      dout(10) << "_finish_op " << o->op << " next_finish " << next_finish
-              << " queueing delayed " << c << " doing " << s << dendl;
-      if (s) {
-       s->finish(0);
-       delete s;
-      }
-      op_finisher.queue(c);
-      next_finish++;
-    }
-  } else {
-    dout(10) << "_finish_op " << o->op << " next_finish " << next_finish
-            << ", delaying " << o->onreadable << dendl;
-    finish_queue[o->op] = pair<Context*,Context*>(o->onreadable, o->onreadable_sync);
+  if (o->onreadable_sync) {
+    o->onreadable_sync->finish(0);
+    delete o->onreadable_sync;
   }
-
+  op_finisher.queue(o->onreadable);
   delete o;
 }
 
index 09eea071927f9a69c5cf23580428f064b6590445..3eb1400f3c4ef2d73d238a2451fec76978e6268d 100644 (file)
@@ -179,7 +179,6 @@ class FileStore : public JournalingObjectStore,
   Cond op_throttle_cond;
   Finisher op_finisher;
   uint64_t next_finish;
-  map<uint64_t, pair<Context*,Context*> > finish_queue;
 
   ThreadPool op_tp;
   struct OpWQ : public ThreadPool::WorkQueue<OpSequencer> {