bdev/raid: remove random IO sizes from test_io_failure()
Use 2 fixed sizes instead. Change-Id: I617835311d3649e03b115bf528ac2a625ff5ec04 Signed-off-by: paul luse <paul.e.luse@intel.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/454514 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
4c3c840127
commit
41730a8dbe
@ -1791,7 +1791,7 @@ test_io_failure(void)
|
|||||||
for (count = 0; count < 1; count++) {
|
for (count = 0; count < 1; count++) {
|
||||||
bdev_io = calloc(1, sizeof(struct spdk_bdev_io) + sizeof(struct raid_bdev_io));
|
bdev_io = calloc(1, sizeof(struct spdk_bdev_io) + sizeof(struct raid_bdev_io));
|
||||||
SPDK_CU_ASSERT_FATAL(bdev_io != NULL);
|
SPDK_CU_ASSERT_FATAL(bdev_io != NULL);
|
||||||
io_len = (rand() % g_strip_size) + 1;
|
io_len = (g_strip_size / 2) << count;
|
||||||
bdev_io_initialize(bdev_io, &pbdev->bdev, lba, io_len, SPDK_BDEV_IO_TYPE_INVALID);
|
bdev_io_initialize(bdev_io, &pbdev->bdev, lba, io_len, SPDK_BDEV_IO_TYPE_INVALID);
|
||||||
lba += g_strip_size;
|
lba += g_strip_size;
|
||||||
memset(g_io_output, 0, (g_max_io_size / g_strip_size) + 1 * sizeof(struct io_output));
|
memset(g_io_output, 0, (g_max_io_size / g_strip_size) + 1 * sizeof(struct io_output));
|
||||||
@ -1809,7 +1809,7 @@ test_io_failure(void)
|
|||||||
for (count = 0; count < 1; count++) {
|
for (count = 0; count < 1; count++) {
|
||||||
bdev_io = calloc(1, sizeof(struct spdk_bdev_io) + sizeof(struct raid_bdev_io));
|
bdev_io = calloc(1, sizeof(struct spdk_bdev_io) + sizeof(struct raid_bdev_io));
|
||||||
SPDK_CU_ASSERT_FATAL(bdev_io != NULL);
|
SPDK_CU_ASSERT_FATAL(bdev_io != NULL);
|
||||||
io_len = (rand() % g_strip_size) + 1;
|
io_len = (g_strip_size / 2) << count;
|
||||||
bdev_io_initialize(bdev_io, &pbdev->bdev, lba, io_len, SPDK_BDEV_IO_TYPE_WRITE);
|
bdev_io_initialize(bdev_io, &pbdev->bdev, lba, io_len, SPDK_BDEV_IO_TYPE_WRITE);
|
||||||
lba += g_strip_size;
|
lba += g_strip_size;
|
||||||
memset(g_io_output, 0, (g_max_io_size / g_strip_size) + 1 * sizeof(struct io_output));
|
memset(g_io_output, 0, (g_max_io_size / g_strip_size) + 1 * sizeof(struct io_output));
|
||||||
|
Loading…
Reference in New Issue
Block a user