Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 148059
b: refs/heads/master
c: 301e0f7
h: refs/heads/master
i:
  148057: 209886c
  148055: adc7ddb
v: v3
  • Loading branch information
Mike Christie authored and James Bottomley committed May 23, 2009
1 parent e2f60f9 commit e58b6d7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3bbaaad95fd38dedb7c66a601f14825b4e0c5a59
refs/heads/master: 301e0f7e4d78e956c58b66888e134dbdb44ea28e
15 changes: 6 additions & 9 deletions trunk/drivers/scsi/libiscsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1390,26 +1390,23 @@ int iscsi_queuecommand(struct scsi_cmnd *sc, void (*done)(struct scsi_cmnd *))
goto fault;
}

/*
* ISCSI_STATE_FAILED is a temp. state. The recovery
* code will decide what is best to do with command queued
* during this time
*/
if (session->state != ISCSI_STATE_LOGGED_IN &&
session->state != ISCSI_STATE_FAILED) {
if (session->state != ISCSI_STATE_LOGGED_IN) {
/*
* to handle the race between when we set the recovery state
* and block the session we requeue here (commands could
* be entering our queuecommand while a block is starting
* up because the block code is not locked)
*/
switch (session->state) {
case ISCSI_STATE_FAILED:
case ISCSI_STATE_IN_RECOVERY:
reason = FAILURE_SESSION_IN_RECOVERY;
goto reject;
sc->result = DID_IMM_RETRY << 16;
break;
case ISCSI_STATE_LOGGING_OUT:
reason = FAILURE_SESSION_LOGGING_OUT;
goto reject;
sc->result = DID_IMM_RETRY << 16;
break;
case ISCSI_STATE_RECOVERY_FAILED:
reason = FAILURE_SESSION_RECOVERY_TIMEOUT;
sc->result = DID_TRANSPORT_FAILFAST << 16;
Expand Down

0 comments on commit e58b6d7

Please sign in to comment.