bdev: Initialize md_buf for zero copy start request
In emulated zero copy mode on devices with separate metadata support the start zero copy request could assert after read completion, during _bdev_io_unset_bounce_buf; the original iovs would be NULL, but original md_buf would have garbage data. Signed-off-by: Kozlowski Mateusz <mateusz.kozlowski@intel.com> Change-Id: Ia52b012c1b7462ebe490c29f5493168775646848 Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/473455 Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
parent
fa540f18d8
commit
5b88597ac6
@ -3152,6 +3152,7 @@ spdk_bdev_zcopy_start(struct spdk_bdev_desc *desc, struct spdk_io_channel *ch,
|
|||||||
bdev_io->u.bdev.offset_blocks = offset_blocks;
|
bdev_io->u.bdev.offset_blocks = offset_blocks;
|
||||||
bdev_io->u.bdev.iovs = NULL;
|
bdev_io->u.bdev.iovs = NULL;
|
||||||
bdev_io->u.bdev.iovcnt = 0;
|
bdev_io->u.bdev.iovcnt = 0;
|
||||||
|
bdev_io->u.bdev.md_buf = NULL;
|
||||||
bdev_io->u.bdev.zcopy.populate = populate ? 1 : 0;
|
bdev_io->u.bdev.zcopy.populate = populate ? 1 : 0;
|
||||||
bdev_io->u.bdev.zcopy.commit = 0;
|
bdev_io->u.bdev.zcopy.commit = 0;
|
||||||
bdev_io->u.bdev.zcopy.start = 1;
|
bdev_io->u.bdev.zcopy.start = 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user