Skip to contentSkip to conversation

libiscsi: return error passed in during iscsi recovery

PATCH New [email protected] 1 participant 2 messages Sep 6, 2008

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 libiscsi: return error passed in during iscsi recovery

From: Mike Christie <[email protected]>

Due to patch building error on my side, we are still passing DID_BUS_BUSY for commands that are running, when we want to return whatever the caller of fail_all_commands wanted. This replaces the hardcoded error code with the value that is passed in.

Patch was made over scsi-post, but is applyable over scsi-misc.

---
 drivers/scsi/libiscsi.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/scsi/libiscsi.c +1 -1
index 3f1b492..0e8f26b 100644
@@ -1454,7 +1454,7 @@ static void fail_all_commands(struct iscsi_conn *conn, unsigned lun,
 		if (lun == task->sc->device->lun || lun == -1) {
 			debug_scsi("failing in progress sc %p itt 0x%x\n",
 				   task->sc, task->itt);
-			fail_command(conn, task, DID_BUS_BUSY << 16);
+			fail_command(conn, task, error << 16);
 		}
 	}
 }
Signature · 1 line
1.5.4.1
#1 lore raw

PATCH 2/2 scsi_dh_alua: remove REQ_NOMERGE

From: Mike Christie <[email protected]>

We do not need to set REQ_NOMERGE because when the module calls blk_execute_rq -> blk_execute_rq_nowait, blk_execute_rq_nowait sets it for us. This brings all the modules in sync for those bits.

Patch was made over scsi-post, but is applyable over scsi-misc.

---
 drivers/scsi/device_handler/scsi_dh_alua.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/scsi/device_handler/scsi_dh_alua.c +1 -1
index 6bc55a6..f3faeea 100644
@@ -110,7 +110,7 @@ static struct request *get_alua_req(struct scsi_device *sdev,
 
 	rq->cmd_type = REQ_TYPE_BLOCK_PC;
 	rq->cmd_flags |= REQ_FAILFAST_DEV | REQ_FAILFAST_TRANSPORT |
-			 REQ_FAILFAST_DRIVER | REQ_NOMERGE;
+			 REQ_FAILFAST_DRIVER;
 	rq->retries = ALUA_FAILOVER_RETRIES;
 	rq->timeout = ALUA_FAILOVER_TIMEOUT;
 
Signature · 1 line
1.5.4.1