Spdk/lib/vhost
Darek Stojaczyk 5d07cfad54 vhost/scsi: handle io_channel allocation failure
We assumed io_channel allocation always succeeds, but
that's not true. Doing I/O to any vhost session that
failed to allocate an io_channel would most likely
cause a crash.

We'll now detect io_channel allocation failure and
print a proper error message. The SCSI target for
which the channel allocation failed simply won't be
visible to the vhost master. All I/O to that target
will be rejected.

We should probably report the error to the upper
layer and either prevent the device from starting
or fail the SCSI target hotplug request. But for now
let's just prevent the crash.

Change-Id: I735dfb930d8905f70636a236b4fa94288d0aaf3a
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/444874
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-02-15 21:41:00 +00:00
..
rte_vhost vhost: do not close a closed connfd 2019-01-16 05:11:58 +00:00
Makefile vhost_user_nvme: add vhost user nvme target to SPDK 2018-04-03 15:01:24 -04:00
vhost_blk.c vhost: remove vhost external events 2019-02-06 19:04:21 +00:00
vhost_internal.h vhost: expose vdevs to the public API 2019-02-04 19:29:36 +00:00
vhost_nvme.c vhost/nvme: fix vhost-nvme target with session feature 2019-01-29 06:47:18 +00:00
vhost_rpc.c vhost/rpc: remove unnecessary if in the add_vhost_scsi_lun RPC 2019-02-06 19:04:21 +00:00
vhost_scsi.c vhost/scsi: handle io_channel allocation failure 2019-02-15 21:41:00 +00:00
vhost.c vhost: remove vhost external events 2019-02-06 19:04:21 +00:00