Commit ab8a0460 authored by Dariusz Stojaczyk's avatar Dariusz Stojaczyk Committed by Daniel Verkamp
Browse files

bdev: clear bdev_io->iov for unmap



Values from previous bdev_ios
were reused and were taken into
account e.g. in bdev_io_get_buf()
to check if a buffer is already
assigned.

Change-Id: I239aaf83a4ce8a9342c1820e3ac9e9ccf6a28336
Signed-off-by: default avatarDariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/382959


Tested-by: default avatarSPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarDaniel Verkamp <daniel.verkamp@intel.com>
parent 866f15b3
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1157,6 +1157,8 @@ spdk_bdev_unmap_blocks(struct spdk_bdev_desc *desc, struct spdk_io_channel *ch,

	bdev_io->ch = channel;
	bdev_io->type = SPDK_BDEV_IO_TYPE_UNMAP;
	bdev_io->u.bdev.iov.iov_base = NULL;
	bdev_io->u.bdev.iov.iov_len = 0;
	bdev_io->u.bdev.iovs = &bdev_io->u.bdev.iov;
	bdev_io->u.bdev.iovcnt = 1;
	bdev_io->u.bdev.offset_blocks = offset_blocks;