bdevperf: Fix incorrect error detection and log for IO size
g_io_size is already verified not to be zero when args are originally parsed, and if g_io_size < data_block_size, then g_io_size % data_block_size != 0. So current error log is not correct and just testing if IO size is multiples of block size will be correct. Change-Id: I5d32425e251773f1c96740c674b4d238dfb80f8d Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-on: https://review.gerrithub.io/c/444310 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
This commit is contained in:
parent
3c3510a2fd
commit
8ad0935b81
@ -275,9 +275,8 @@ bdevperf_construct_target(struct spdk_bdev *bdev, struct io_target **_target)
|
||||
}
|
||||
data_block_size = block_size - md_size;
|
||||
target->io_size_blocks = g_io_size / data_block_size;
|
||||
if (target->io_size_blocks == 0 || (g_io_size % data_block_size) != 0) {
|
||||
SPDK_ERRLOG("IO size (%d) is bigger than data block size of bdev %s (%"PRIu32") or"
|
||||
" not a data block size multiple\n",
|
||||
if ((g_io_size % data_block_size) != 0) {
|
||||
SPDK_ERRLOG("IO size (%d) is not multiples of data block size of bdev %s (%"PRIu32")\n",
|
||||
g_io_size, spdk_bdev_get_name(bdev), data_block_size);
|
||||
spdk_bdev_close(target->bdev_desc);
|
||||
free(target->name);
|
||||
|
Loading…
x
Reference in New Issue
Block a user