Skip to contentSkip to conversation

SCSI: export scsi_eh_finish_cmd() and scsi_eh_flush_done_q()

PATCH In review Tejun Heo 3 participants 4 messages Jan 23, 2006 1 message not in the archive SCSI

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Tejun Heo

author
#1 lore raw

PATCH 7/13 SCSI: export scsi_eh_finish_cmd() and scsi_eh_flush_done_q()

Export two SCSI EH command handling functions. To be used by libata EH.

---

James, this patch is a part of libata-EH related updates. After the update, libata EH uses functions exported from this patch to retry or complete failed commands.

 drivers/scsi/scsi_error.c |    7 ++++---
 include/scsi/scsi_eh.h    |    3 +++
 2 files changed, 7 insertions(+), 3 deletions(-)

296dd6345057f576a875e6a140f0fd11e2b1d54f

drivers/scsi/scsi_error.c +4 -3
index a2333d2..6bac3d2 100644
@@ -584,8 +584,7 @@ static int scsi_request_sense(struct scs
  *    keep a list of pending commands for final completion, and once we
  *    are ready to leave error handling we handle completion for real.
  **/
-static void scsi_eh_finish_cmd(struct scsi_cmnd *scmd,
-			       struct list_head *done_q)
+void scsi_eh_finish_cmd(struct scsi_cmnd *scmd, struct list_head *done_q)
 {
 	scmd->device->host->host_failed--;
 	scmd->eh_eflags = 0;
@@ -597,6 +596,7 @@ static void scsi_eh_finish_cmd(struct sc
 	scsi_setup_cmd_retry(scmd);
 	list_move_tail(&scmd->eh_entry, done_q);
 }
+EXPORT_SYMBOL(scsi_eh_finish_cmd);
 
 /**
  * scsi_eh_get_sense - Get device sense data.
@@ -1425,7 +1425,7 @@ static void scsi_eh_ready_devs(struct Sc
  * @done_q:	list_head of processed commands.
  *
  **/
-static void scsi_eh_flush_done_q(struct list_head *done_q)
+void scsi_eh_flush_done_q(struct list_head *done_q)
 {
 	struct scsi_cmnd *scmd, *next;
 
@@ -1454,6 +1454,7 @@ static void scsi_eh_flush_done_q(struct 
 		}
 	}
 }
+EXPORT_SYMBOL(scsi_eh_flush_done_q);
 
 /**
  * scsi_unjam_host - Attempt to fix a host which has a cmd that failed.
include/scsi/scsi_eh.h +3 -0
index fabd879..d160880 100644
@@ -35,6 +35,9 @@ static inline int scsi_sense_valid(struc
 }
 
 
+extern void scsi_eh_finish_cmd(struct scsi_cmnd *scmd,
+			       struct list_head *done_q);
+extern void scsi_eh_flush_done_q(struct list_head *done_q);
 extern void scsi_report_bus_reset(struct Scsi_Host *, int);
 extern void scsi_report_device_reset(struct Scsi_Host *, int, int);
 extern int scsi_block_when_processing_errors(struct scsi_device *);
Signature · 1 line
1.0.8
author
#2 lore raw
Quoted 10 lines · Tejun Heo

Export two SCSI EH command handling functions. To be used by libata EH.

---

James, this patch is a part of libata-EH related updates. After the update, libata EH uses functions exported from this patch to retry or complete failed commands.

Sorry, James & SCSI guys.

Please ignore this message. This was test run gone bad.

Signature · 1 line
tejun
#3 lore raw
In reply to Tejun Heo
Quoted 1 line · Tejun Heo

Export two SCSI EH command handling functions. To be used by libata EH.

What do you need it for? Please send the whole patch series (and generally anything in libata that interacts with the scsi midlayer) to linux-scsi, please.

#4 lore raw
Quoted 6 lines · Christoph Hellwig
Quoted 1 line · Tejun Heo

Export two SCSI EH command handling functions. To be used by libata EH.

What do you need it for? Please send the whole patch series (and generally anything in libata that interacts with the scsi midlayer) to linux-scsi, please.

It will replace the nasty and insufficient scsi_finish_command() export, which doesn't retry like Tejun's current patches do. Exporting these two functions, and un-exporting scsi_finish_command(), is necessary for users of ->eh_strategy_handler().

Jeff