public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] scsi: sense retry
@ 2008-08-12 19:11 Mike Anderson
  2008-08-12 19:11 ` [PATCH 1/2] scsi: scsi_dh check_sense return ADD_TO_MLQUEUE Mike Anderson
  2008-08-12 19:11 ` [PATCH 2/2] scsi: scsi_check_sense HARDWARE_ERROR " Mike Anderson
  0 siblings, 2 replies; 6+ messages in thread
From: Mike Anderson @ 2008-08-12 19:11 UTC (permalink / raw)
  To: linux-scsi; +Cc: Chandra Seetharaman, Hannes Reinecke

This patch series effects the retry behavior of IO when blk_noretry_request is used.

The patches effect the retries in two areas. The first is that it allows
the scsi_dh check_sense routines to have more control of the retry of a
IO.  Currently if the scsi_dh check_sense functions return NEEDS_RETRY
this will not lead to a retry in the DM-MP configurations where they are
most likely to be used because the blk_noretry_request will be true for
these IOs which will prevent the retry. The second change in behavior of
the HARDWARE_ERROR sense key is to avoid path failures of all DM-MP paths
for the IBM device(s) returning this sense key.  The utilization of
ADD_TO_MLQUEUE for the HARDWARE_ERROR sense key could lead to longer retry
times for the other user of BLIST_RETRY_HWERROR.

I have tried to summarize the scsi_decide_disposition current retry behavior
below.


1.) Based on host_byte
	The host bytes listed below will return ADD_TO_MLQUEUE or NEEDS_RETRY
	which is always retried up to the max scsi mid-layer in-flight time
	(unsigned long  wait_for = (cmd->allowed + 1) * cmd->timeout_per_command;).

	DID_REQUEUE:
		(returns ADD_TO_MLQUEUE)
	DID_IMM_RETRY:
                (returns NEEDS_RETRY)

	The host bytes listed below will use the maybe_retry goto which will
	not be retried if blk_noretry_request is true.

	DID_ERROR:
	DID_SOFT_ERROR:
	DID_BUS_BUSY:
	DID_PARITY:

2.) Based on status_byte
	The status bytes listed below will return ADD_TO_MLQUEUE which is
	always retried up to the max scsi mid-layer in-flight time (unsigned
	long  wait_for = (cmd->allowed + 1) * cmd->timeout_per_command;).

	BUSY:
	QUEUE_FULL:

3.) Based on sense_key
	The sense keys and sense checks listed below will return NEEDS_RETRY
	which will be not be retried if blk_noretry_request is true.

	Note1: There is some if checks removed to simplify the list. Please see
	code for more detailed behavior.

	Note2: All scsi_dh sense_check functions will be effected by the
	blk_noretry_request check.

	scsi_sense_is_deferred
	ABORTED_COMMAND:
	NOT_READY:
	UNIT_ATTENTION:
	MEDIUM_ERROR:
	HARDWARE_ERROR:


I have summarized the change in retry behavior below.

1.) Based on sense_key

	The current scsi_dh sense_check functions will return
	ADD_TO_MLQUEUE.

	HARDWARE_ERROR will return ADD_TO_MLQUEUE if retry_hwerror is set.

-andmike
--
Michael Anderson
andmike@linux.vnet.ibm.com




^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-08-25 20:03 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-12 19:11 [PATCH 0/2] scsi: sense retry Mike Anderson
2008-08-12 19:11 ` [PATCH 1/2] scsi: scsi_dh check_sense return ADD_TO_MLQUEUE Mike Anderson
2008-08-25 12:33   ` Hannes Reinecke
2008-08-25 20:02     ` Chandra Seetharaman
2008-08-12 19:11 ` [PATCH 2/2] scsi: scsi_check_sense HARDWARE_ERROR " Mike Anderson
2008-08-25 12:34   ` Hannes Reinecke

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox