]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/blob - src/patches/suse-2.6.27.39/patches.fixes/libiscsi-Update-queuecommand-return-codes-for-multipath
Imported linux-2.6.27.39 suse/xen patches.
[people/teissler/ipfire-2.x.git] / src / patches / suse-2.6.27.39 / patches.fixes / libiscsi-Update-queuecommand-return-codes-for-multipath
1 From: Hannes Reinecke <hare@suse.de>
2 Date: Tue, 18 Aug 2009 11:37:41 +0200
3 Subject: libiscsi: Update queuecommand return codes for multipathing
4 References: bnc#472432
5
6 For multipathing we should be returning DID_TRANSPORT_XXX
7 messages for any error which should be retried on some other
8 path. And the 'chkready' function is quite pointless here.
9
10 Signed-off-by: Hannes Reinecke <hare@suse.de>
11 ---
12 drivers/scsi/libiscsi.c | 9 +++------
13 1 files changed, 3 insertions(+), 6 deletions(-)
14
15 diff --git a/drivers/scsi/libiscsi.c b/drivers/scsi/libiscsi.c
16 index 14ba60f..32b30f1 100644
17 --- a/drivers/scsi/libiscsi.c
18 +++ b/drivers/scsi/libiscsi.c
19 @@ -1327,12 +1327,6 @@ int iscsi_queuecommand(struct scsi_cmnd *sc, void (*done)(struct scsi_cmnd *))
20 session = cls_session->dd_data;
21 spin_lock(&session->lock);
22
23 - reason = iscsi_session_chkready(cls_session);
24 - if (reason) {
25 - sc->result = reason;
26 - goto fault;
27 - }
28 -
29 if (session->state != ISCSI_STATE_LOGGED_IN) {
30 /*
31 * to handle the race between when we set the recovery state
32 @@ -1342,6 +1336,9 @@ int iscsi_queuecommand(struct scsi_cmnd *sc, void (*done)(struct scsi_cmnd *))
33 */
34 switch (session->state) {
35 case ISCSI_STATE_FAILED:
36 + reason = FAILURE_SESSION_FAILED;
37 + sc->result = DID_TRANSPORT_DISRUPTED << 16;
38 + break;
39 case ISCSI_STATE_IN_RECOVERY:
40 reason = FAILURE_SESSION_IN_RECOVERY;
41 sc->result = DID_IMM_RETRY << 16;
42 --
43 1.6.0.2
44