浏览代码

[SCSI] libiscsi: make sure session is not blocked when removing host

When we logout we block the session since we are not taking any more
commands, but when we call remove host we want to make sure any
IO that got queued up and blocked gets failed upwards quickly, so
we unblock the session and fail it.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Mike Christie 18 年之前
父节点
当前提交
464bb99ea4
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      drivers/scsi/libiscsi.c

+ 1 - 0
drivers/scsi/libiscsi.c

@@ -1473,6 +1473,7 @@ void iscsi_session_teardown(struct iscsi_cls_session *cls_session)
 	struct iscsi_session *session = iscsi_hostdata(shost->hostdata);
 	struct iscsi_session *session = iscsi_hostdata(shost->hostdata);
 	struct module *owner = cls_session->transport->owner;
 	struct module *owner = cls_session->transport->owner;
 
 
+	iscsi_unblock_session(cls_session);
 	scsi_remove_host(shost);
 	scsi_remove_host(shost);
 
 
 	iscsi_pool_free(&session->mgmtpool, (void**)session->mgmt_cmds);
 	iscsi_pool_free(&session->mgmtpool, (void**)session->mgmt_cmds);