vhost-blk: fix error reporting on bdev hot-removal
blk_iovs_setup() error code was missinterpeted and no error returned for IO that was directed to removed bdev. Change-Id: Iec5ebef20734cca07f20f068b83b74b189cdcb66 Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com> Reviewed-on: https://review.gerrithub.io/370711 Tested-by: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Lukasz Galka <lukaszx.galka@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
This commit is contained in:
parent
28918dc4d9
commit
b368258bb3
@ -331,7 +331,7 @@ no_bdev_vdev_worker(void *arg)
|
||||
}
|
||||
|
||||
iovcnt = SPDK_COUNTOF(iovs);
|
||||
if (blk_iovs_setup(&bvdev->vdev, vq, req_idx, iovs, &iovcnt, &length) && iovcnt >= 2) {
|
||||
if (blk_iovs_setup(&bvdev->vdev, vq, req_idx, iovs, &iovcnt, &length) == 0) {
|
||||
*(volatile uint8_t *)iovs[iovcnt - 1].iov_base = VIRTIO_BLK_S_IOERR;
|
||||
SPDK_TRACELOG(SPDK_TRACE_VHOST_BLK_DATA, "Aborting request %" PRIu16"\n", req_idx);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user