]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
hammer: tools: fix race condition in seq/rand bench (part 1) 7896/head
authorAlexey Sheplyakov <asheplyakov@mirantis.com>
Thu, 3 Mar 2016 12:30:23 +0000 (15:30 +0300)
committerAlexey Sheplyakov <asheplyakov@mirantis.com>
Thu, 3 Mar 2016 12:32:15 +0000 (15:32 +0300)
commit3a5b1029f8f30bca569b12195329224208855096
tree11b794fe6651874fd4275f12c260c99c628f7896
parent20b2a7413e8f7538ff0683313e7b19c41aaf69ad
hammer: tools: fix race condition in seq/rand bench (part 1)

src/common/obj_bencher.cc:601: the lock should be taken before calling completion_ret,
not after. Also note that if r < 0 the lock will be unlocked twice in a row.
As a result rados bench seq fails with assertion in Mutex::Unlock().

Signed-off-by: Piotr Dałek <piotr.dalek@ts.fujitsu.com>
Signed-off-by: Alexey Sheplyakov <asheplyakov@mirantis.com>
(cherry picked from commit 0c8faf7c9982c564002771c3a41362a833ace9bb)

Conflicts:
src/common/obj_bencher.cc
src/common/obj_bencher.h
  Pick only the lock related part to unbreak seq bench. The failure due
  to the missing (or wrong sized) objects can be easily worked around, and
  the changes required to fix this problem are way too intrusive for hammer.

http://tracker.ceph.com/issues/14873 Related: #14873
src/common/obj_bencher.cc