numam-spdk/test/bdev
Jim Harris c9268075ab bdevperf: use uint64_t to save per-job length
When specifying -C for multithread mode, we calculate
a 'blocks_per_job' to tell each core what subset of
the bdev it should target with I/O.  But this
blocks_per_job, and the config->length member that it
gets copied to, were ints.  For devices with num
blocks > INT32_MAX, this can cause overflow if the
num blocks is also < UINT32_MAX (because then we end
up storing a negative value in the bdevperf's length
field).

For sequential workloads, it may take a long time until
it happens, but for random workloads it fails almost
immediately.

Fixes issue #2108.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I6c2b787ab5d3c6bfe12efd183ce86d4d95f9b6c6

Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9231
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Dong Yi <dongx.yi@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-08-20 07:27:09 +00:00
..
bdevio event: Shift subsystem initialization code to a separate library 2021-05-24 10:12:50 +00:00
bdevperf bdevperf: use uint64_t to save per-job length 2021-08-20 07:27:09 +00:00
bdev_raid.sh tests: Switch to $SPDK_TEST_STORAGE for writing out bigger tmp files 2020-05-20 14:17:02 +00:00
blockdev.sh test: fix nbd test typo and add check 2021-06-23 18:07:46 +00:00
Makefile test: move the bdev directory up one level 2018-03-23 19:45:09 -04:00
nbd_common.sh tests: Switch to $SPDK_TEST_STORAGE for writing out bigger tmp files 2020-05-20 14:17:02 +00:00