Skip to content

Commit

Permalink
[SCSI] libiscsi: make sure session is not blocked when removing host
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Mike Christie authored and James Bottomley committed Jul 27, 2007
1 parent 1d1bbee commit 464bb99
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/scsi/libiscsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1473,6 +1473,7 @@ void iscsi_session_teardown(struct iscsi_cls_session *cls_session)
struct iscsi_session *session = iscsi_hostdata(shost->hostdata);
struct module *owner = cls_session->transport->owner;

iscsi_unblock_session(cls_session);
scsi_remove_host(shost);

iscsi_pool_free(&session->mgmtpool, (void**)session->mgmt_cmds);
Expand Down

0 comments on commit 464bb99

Please sign in to comment.