5d07cfad54
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>