diff options
author | Samuel Just <samuel.just@dreamhost.com> | 2011-11-17 13:45:08 -0800 |
---|---|---|
committer | Samuel Just <samuel.just@dreamhost.com> | 2011-11-18 15:56:59 -0800 |
commit | 57ad8b2ebf647e3aa81cb5d5296e7ce7857ecf93 (patch) | |
tree | 940821e105393eea56d4d2c8a28cfed09bb2ac64 | |
parent | dedf2c4a066876bdab9a0b0154196194cefc1340 (diff) | |
download | ceph-57ad8b2ebf647e3aa81cb5d5296e7ce7857ecf93.tar.gz |
FileStore.cc: onreadable callbacks in OpSequencer order is enough
Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
-rw-r--r-- | src/os/FileStore.cc | 32 | ||||
-rw-r--r-- | src/os/FileStore.h | 1 |
2 files changed, 4 insertions, 29 deletions
diff --git a/src/os/FileStore.cc b/src/os/FileStore.cc index e135fa32b97..3c64620f1bc 100644 --- a/src/os/FileStore.cc +++ b/src/os/FileStore.cc @@ -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; } diff --git a/src/os/FileStore.h b/src/os/FileStore.h index 09eea071927..3eb1400f3c4 100644 --- a/src/os/FileStore.h +++ b/src/os/FileStore.h @@ -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> { |