]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
common/obj_bencher.cc: fix verification crashing when there's no objects
authorPiotr Dałek <piotr.dalek@ts.fujitsu.com>
Wed, 9 Sep 2015 08:57:00 +0000 (10:57 +0200)
committerPiotr Dałek <piotr.dalek@ts.fujitsu.com>
Tue, 29 Sep 2015 07:11:12 +0000 (09:11 +0200)
commit0c8faf7c9982c564002771c3a41362a833ace9bb
treed15674c583f2951775644bd53acb3ea92ba4ed11
parent903983a11acc8b0f63a7effed7c49ff42212d822
common/obj_bencher.cc: fix verification crashing when there's no objects

When specified pool is empty or doesn't contain valid bench objects, rados
can crash because it attempts to memcmp through NULL pointer. Added check
for valid object size (which also fixes the case when objects are there, but
they're truncated), and made object_size being size_t instead of int.
In seq_read_bench, there's a missing lock.Lock() which causes rados to trigger
assert when object reading fails. Moved lock.Lock() before completion_ret()
call.

Signed-off-by: Piotr Dałek <piotr.dalek@ts.fujitsu.com>
src/common/obj_bencher.cc
src/common/obj_bencher.h