]> git.ipfire.org Git - ipfire-2.x.git/blame - src/patches/suse-2.6.27.39/patches.fixes/libiscsi-Update-queuecommand-return-codes-for-multipath
Fix oinkmaster patch.
[ipfire-2.x.git] / src / patches / suse-2.6.27.39 / patches.fixes / libiscsi-Update-queuecommand-return-codes-for-multipath
CommitLineData
82094b55
AF
1From: Hannes Reinecke <hare@suse.de>
2Date: Tue, 18 Aug 2009 11:37:41 +0200
3Subject: libiscsi: Update queuecommand return codes for multipathing
4References: bnc#472432
5
6For multipathing we should be returning DID_TRANSPORT_XXX
7messages for any error which should be retried on some other
8path. And the 'chkready' function is quite pointless here.
9
10Signed-off-by: Hannes Reinecke <hare@suse.de>
11---
12 drivers/scsi/libiscsi.c | 9 +++------
13 1 files changed, 3 insertions(+), 6 deletions(-)
14
15diff --git a/drivers/scsi/libiscsi.c b/drivers/scsi/libiscsi.c
16index 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--
431.6.0.2
44