Commit 497997bc authored by Shuhei Matsumoto's avatar Shuhei Matsumoto Committed by Jim Harris
Browse files

SCSI: Stop I/O flooding to hot-removing LUN from iSCSI target



We have observed unexpcted timeout when we remove LUNs from the
active iSCSI target dynamically during FIO workload.

By making destroy_raid_bdev RPC wait for its completion, we could know
the destroy_raid_bdev RPC caused timeout because LUN hot removal didn't
complete.

By investigating the log, incoming I/Os from the host had not stopped
even after hot removal process was started.

The reason was that iSCSI target had continued to accept incoming I/Os
from the host.

By removing LUN from the SCSI device at the start of the LUN hot removal
process, iSCSI target will be able to stop incoming I/Os and LUN hot removal
will complete in finite time.

LUN itself can be accessible even after it is removed from the SCSI device.

LUN hot removal is for not I_T nexus but I_T_L nexus and so we cannot
start connection exiting in this case because connection can have multiple
LUNs. So this fix requires few changes and will be practical.

  Fixes #715

Change-Id: I17d7a1f6c6557297289c3bd148a62db46da48ec5
Signed-off-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/453959


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarChangpeng Liu <changpeng.liu@intel.com>
parent cd02f1cd
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -216,7 +216,6 @@ scsi_lun_remove(struct spdk_scsi_lun *lun)
{
	spdk_bdev_close(lun->bdev_desc);

	spdk_scsi_dev_delete_lun(lun->dev, lun);
	free(lun);
}

@@ -299,6 +298,8 @@ scsi_lun_hot_remove(void *remove_ctx)
	}

	lun->removed = true;
	spdk_scsi_dev_delete_lun(lun->dev, lun);

	if (lun->io_channel == NULL) {
		_scsi_lun_hot_remove(lun);
		return;