When do 'ceph tell osd.x bench', if block_size is larger than
object_size, it will cause Floating point exception.
For this case, set block_size = object_size(expect object_size = 0).
Also add related test-case.
Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
}
}
+ if (osize && bsize > osize)
+ bsize = osize;
+
dout(1) << " bench count " << count
<< " bsize " << prettybyte_t(bsize) << dendl;
# default values should work
#
ceph tell osd.0 bench || return 1
+
+ #
+ # test object_size < block_size
+ ceph tell osd.0 bench 10 14456 4444 3
+ #
+
+ #
+ # test object_size < block_size & object_size = 0(default value)
+ #
+ ceph tell osd.0 bench 1 14456
}
main osd-bench "$@"