diff options
author | Sage Weil <sage@newdream.net> | 2012-03-02 10:07:03 -0800 |
---|---|---|
committer | Sage Weil <sage@newdream.net> | 2012-03-03 15:32:35 -0800 |
commit | b2c0de6687076e4ef0986966ef1201635c864f3b (patch) | |
tree | 3869330b6fc1bd0c246fadea14431bca3e353172 | |
parent | 186b7e10b91c4f06e66e7ded820acde254e00974 (diff) | |
download | ceph-b2c0de6687076e4ef0986966ef1201635c864f3b.tar.gz |
Revert "filestore: fix op queue quiesce during commit"historic/btrfs-bug-2198
This reverts commit 1009d1a016f049e19ad729a0c00a354a3956caf7.
-rw-r--r-- | src/os/JournalingObjectStore.cc | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/os/JournalingObjectStore.cc b/src/os/JournalingObjectStore.cc index b54b33cd969..67600cf09dc 100644 --- a/src/os/JournalingObjectStore.cc +++ b/src/os/JournalingObjectStore.cc @@ -128,8 +128,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; - // sleep until we are not blocked AND we are at the front of line - while (blocked || ops_apply_blocked.front() != &cond) + 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(); @@ -137,17 +136,19 @@ uint64_t JournalingObjectStore::_op_apply_start(uint64_t op) dout(10) << "op_apply_start " << op << " ...and kicking next in line" << dendl; ops_apply_blocked.front()->Signal(); } + } else { + dout(10) << "op_apply_start " << op << dendl; } - dout(10) << "op_apply_start " << op << " open_ops " << open_ops << " -> " << (open_ops+1) << dendl; - assert(!blocked); + open_ops++; + return op; } void JournalingObjectStore::op_apply_finish(uint64_t op) { + dout(10) << "op_apply_finish " << op << dendl; journal_lock.Lock(); - dout(10) << "op_apply_finish " << op << " open_ops " << open_ops << " -> " << (open_ops-1) << dendl; if (--open_ops == 0) cond.Signal(); @@ -218,9 +219,7 @@ bool JournalingObjectStore::commit_start() dout(10) << "commit_start blocked, waiting for " << open_ops << " open ops" << dendl; cond.Wait(journal_lock); } - dout(10) << "commit_start blocked, all open_ops have completed" << dendl; - assert(open_ops == 0); - + if (applied_seq == committed_seq && !force_commit) { dout(10) << "commit_start nothing to do" << dendl; blocked = false; |