[PATCH 0/2] scsi: sense retry

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxxx



--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux