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: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/382959
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
This commit is contained in:
Dariusz Stojaczyk 2017-10-18 15:16:02 +02:00 committed by Daniel Verkamp
parent 866f15b3ac
commit ab8a0460a9

View File

@ -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;