numam-spdk/test/bdev/bdevperf
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
..
.gitignore test: move the bdev directory up one level 2018-03-23 19:45:09 -04:00
bdevperf.c bdevperf: use uint64_t to save per-job length 2021-08-20 07:27:09 +00:00
bdevperf.py bdevperf: do not start tests until RPC is sent 2019-07-10 05:11:25 +00:00
common.sh test/bdevperf: test config file 2020-07-27 17:10:31 +00:00
conf.json test/bdevperf: test config file 2020-07-27 17:10:31 +00:00
Makefile event: Shift subsystem initialization code to a separate library 2021-05-24 10:12:50 +00:00
test_config.sh test/bdevperf: test config file 2020-07-27 17:10:31 +00:00