vhost/scsi: dont fail bdev hotremoval without F_HOTPLUG
Following the same change with SCSI target hotremove, we'll now allow hotremoving an underlying bdev without VIRTIO_SCSI_F_HOTPLUG negotiated. The hotremoval will be still reported through SCSI sense codes. Change-Id: I5b3dd09bd72456eda745f4225f76603fad999da6 Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com> Reviewed-on: https://review.gerrithub.io/c/439317 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
c1579c9bbe
commit
5ea5666cbd
@ -793,12 +793,6 @@ spdk_vhost_scsi_lun_hotremove(const struct spdk_scsi_lun *lun, void *arg)
|
|||||||
|
|
||||||
assert(lun != NULL);
|
assert(lun != NULL);
|
||||||
assert(svdev != NULL);
|
assert(svdev != NULL);
|
||||||
if (svdev->vdev.lcore != -1 &&
|
|
||||||
!spdk_vhost_dev_has_feature(svdev->vdev.session, VIRTIO_SCSI_F_HOTPLUG)) {
|
|
||||||
SPDK_WARNLOG("%s: hotremove is not enabled for this controller.\n", svdev->vdev.name);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
scsi_dev = spdk_scsi_lun_get_dev(lun);
|
scsi_dev = spdk_scsi_lun_get_dev(lun);
|
||||||
for (scsi_dev_num = 0; scsi_dev_num < SPDK_VHOST_SCSI_CTRLR_MAX_DEVS; scsi_dev_num++) {
|
for (scsi_dev_num = 0; scsi_dev_num < SPDK_VHOST_SCSI_CTRLR_MAX_DEVS; scsi_dev_num++) {
|
||||||
if (svdev->scsi_dev[scsi_dev_num] == scsi_dev) {
|
if (svdev->scsi_dev[scsi_dev_num] == scsi_dev) {
|
||||||
|
Loading…
Reference in New Issue
Block a user