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
index[slot] = data.started;
lock.Unlock();
completion_wait(slot);
+ lock.Lock();
r = completion_ret(slot);
if (r < 0) {
cerr << "read got " << r << std::endl;
lock.Unlock();
goto ERR;
}
- lock.Lock();
total_latency += data.cur_latency;
if (data.cur_latency > data.max_latency) data.max_latency = data.cur_latency;
if (data.cur_latency < data.min_latency) data.min_latency = data.cur_latency;