spdk_dd: Add check on block size
If passed as a parameter, block size must be a multiple of input native block size, so a check to control this requirement has been added Signed-off-by: Damiano Cipriani <damiano.cipriani@suse.com> Change-Id: I38c41afd421083ba0864d5066d9978cb29bdaed6 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14554 Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
This commit is contained in:
parent
03843f73cb
commit
552a26d9d9
@ -884,6 +884,13 @@ dd_run(void *arg1)
|
||||
return;
|
||||
}
|
||||
|
||||
if (g_opts.input_bdev && g_opts.io_unit_size % g_job.input.block_size != 0) {
|
||||
SPDK_ERRLOG("--bs value must be a multiple of input native block size (%d)\n",
|
||||
g_job.input.block_size);
|
||||
dd_exit(-EINVAL);
|
||||
return;
|
||||
}
|
||||
|
||||
g_job.ios = calloc(g_opts.queue_depth, sizeof(struct dd_io));
|
||||
if (g_job.ios == NULL) {
|
||||
SPDK_ERRLOG("%s\n", strerror(ENOMEM));
|
||||
|
Loading…
Reference in New Issue
Block a user