From 5ea5666cbdaf8dd954c50dd3e3fe8368f6ee9c61 Mon Sep 17 00:00:00 2001 From: Darek Stojaczyk Date: Mon, 17 Dec 2018 04:25:40 +0100 Subject: [PATCH] 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 Reviewed-on: https://review.gerrithub.io/c/439317 Tested-by: SPDK CI Jenkins Chandler-Test-Pool: SPDK Automated Test System Reviewed-by: Ben Walker Reviewed-by: Shuhei Matsumoto Reviewed-by: Jim Harris --- lib/vhost/vhost_scsi.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/lib/vhost/vhost_scsi.c b/lib/vhost/vhost_scsi.c index fd3f7a03d..881b66216 100644 --- a/lib/vhost/vhost_scsi.c +++ b/lib/vhost/vhost_scsi.c @@ -793,12 +793,6 @@ spdk_vhost_scsi_lun_hotremove(const struct spdk_scsi_lun *lun, void *arg) assert(lun != 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); 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) {