numam-spdk/test/unit/lib/bdev
Shuhei Matsumoto 3deaf00580 bdev: Fix wrong IO split when child iovs run out
When we ran out of child_iov space, ensure the iovs to be aligned
with block size. However the calculation was wrong.

(to_next_boundary_bytes % blocklen) meant not to_last_block but to_next_block.
So calculate to_last_block_size by reducing to_last_block_size from blocklen.

The data was collected when the issue occured. So add unit test
by using the data.

    Fixes #979

Reported-by: Geoffrey McRae <geoff@hostfission.com>

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I62a50bada450288ea7c60aec0e557c2a53cd8916
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/470806
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-10-11 00:35:34 +00:00
..
bdev_raid.c module/raid: replace hardcoded "0" with #define for RAID0 2019-09-30 20:35:03 +00:00
bdev.c bdev: Fix wrong IO split when child iovs run out 2019-10-11 00:35:34 +00:00
compress.c ut/compress: add UT for boundary crossings w/vtophys 2019-09-20 14:53:25 +00:00
crypto.c ut: move all spdk_env_* mocks to test_env.c 2019-07-18 04:21:08 +00:00
gpt test/unit: remove duplicate mk/spdk.common.mk includes 2019-02-11 09:30:27 +00:00
mt bdev: Create generic _spdk_bdev_open function 2019-08-21 22:39:07 +00:00
part.c trace: remove short_name 2019-05-02 08:41:56 +00:00
pmem bdev: Not assert but pass completion status to spdk_bdev_io_get_buf_cb 2019-02-27 01:59:11 +00:00
scsi_nvme.c test/unit: remove duplicate mk/spdk.common.mk includes 2019-02-11 09:30:27 +00:00
vbdev_lvol.c bdev/vbdev_lvol: Fix scanbuild error about Null poniter parameter. 2019-07-23 00:17:25 +00:00
Makefile mk: standardize DIRS-x assignments. 2019-08-29 20:16:18 +00:00