Each Vhost SCSI session will now keep its local SCSI targets state that can be accessed without the global vhost mutex. Hotplug will still add the SCSI target reference to the device struct, but will also asynchronously tell each active session to add it's session-local copy. Hotremove, on the other hand, will now try to asynchronously remove a SCSI target from all sessions first and only afterwards it will remove it from the device struct. This allows us to safely hotplug and hotremove SCSI targets into Vhost SCSI devices that have multiple active sessions. Each session will still use its management poller to try to locally remove those targets that were scheduled for hotremoval and the additional spdk_vhost_dev_foreach_session() will now also try to remove each one of them from the entire Vhost SCSI device after making sure they were already removed from all sessions. Change-Id: Idd080b618768c71cd1cd564efeaf930bf79fb578 Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com> Reviewed-on: https://review.gerrithub.io/c/439321 Reviewed-by: Pawel Wodkowski <pawelx.wodkowski@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com> |
||
---|---|---|
.. | ||
rte_vhost | ||
Makefile | ||
vhost_blk.c | ||
vhost_internal.h | ||
vhost_nvme.c | ||
vhost_rpc.c | ||
vhost_scsi.c | ||
vhost.c |