]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
filestore: simplify op quescing
authorSage Weil <sage@inktank.com>
Fri, 7 Dec 2012 00:18:07 +0000 (16:18 -0800)
committerSage Weil <sage@inktank.com>
Sat, 8 Dec 2012 17:32:47 +0000 (09:32 -0800)
commitd9dce4e9273adb4279519d65a0d8bfdfecb5c516
treef6f8f4a7dd248af02a2f48460e0ac5f02540bed3
parent25ea06969fad13f6094cb68995d52906ecaf507a
filestore: simplify op quescing

The delicate balancing with op_apply_start() and that fact that it can
block was making it very hard to determine how long commit_start() should
wait, since requests in the workqueue threads could op_apply_start() in
any order.  For example,

 threadA: gets osr1 from wq
 threadA: gets osr2 from wq
 threadA: dequeue seq 11 from osr1, op_apply_start
 threadC: commit_start on 11
 threadA: op_apply_finish on seq 11
 threadC: commit_started, commit_finish
 threadB: dequeue seq 10 from osr2
   <failed assert, badness>

Instead, rip out all this code, and use the ThreadPool pause() method to
quiesce operations.  Keep some of the (now unnecessary) fields around
for sanity checks (blocked, open_ops, max_applying_seq, etc.).

Signed-off-by: Sage Weil <sage@inktank.com>
src/os/FileStore.cc
src/os/JournalingObjectStore.cc
src/os/JournalingObjectStore.h