Commit 122cc72c authored by Darek Stojaczyk's avatar Darek Stojaczyk Committed by Jim Harris
Browse files

Revert "scsi: Simplify removing LUN when no connection is for it"



The new, simplified scsi lun hotremove path doesn't call
lun->hotremove_cb if there's no io_channel allocated for
that lun. Vhost still depends on that callback and currently,
when the underlying bdev is removed, vhost is left completely
unnotified. It keeps a dangling pointer to a scsi lun and
will eventually crash. The vhost scsi controller also can't
be removed in this case.

This reverts commit 19182431.

Change-Id: I330330fdd7d6941db070d972192481f535f62977
Signed-off-by: default avatarDarek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/454836


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarPaul Luse <paul.e.luse@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
parent 26683005
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -301,7 +301,7 @@ scsi_lun_hot_remove(void *remove_ctx)
	spdk_scsi_dev_delete_lun(lun->dev, lun);

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