Re: [PATCH RFC] replace dm hw handlers with scsi handlers

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

 



Mike Christie wrote:
> +
> +static int clariion_check_sense(struct scsi_sense_hdr *sense_hdr)
> +{
> +	switch (sense_hdr->sense_key) {
> +	case NOT_READY:
> +		if (sense_hdr->asc == 0x04 && sense_hdr->ascq == 0x03)
> +			/*
> +			 * LUN Not Ready - Manual Intervention Required
> +			 * indicates this is a passive path.
> +			 *
> +			 * FIXME: However, if this is seen and EVPD C0
> +			 * indicates that this is due to a NDU in
> +			 * progress, we should set FAIL_PATH too.
> +			 * This indicates we might have to do a SCSI
> +			 * inquiry in the end_io path. Ugh.
> +			 */
> +			return FAILED;
> +		break;
> +	case ILLEGAL_REQUEST:
> +		if (sense_hdr->asc == 0x25 && sense_hdr->ascq == 0x01)
> +			/*
> +			 * An array based copy is in progress. Do not
> +			 * fail the path, do not bypass to another PG,
> +			 * do not retry. Fail the IO immediately.
> +			 * (Actually this is the same conclusion as in
> +			 * the default handler, but lets make sure.)
> +			 */
> +			return FAILED;
> +		break;
> +	case UNIT_ATTENTION:
> +		if (sense_hdr->asc == 0x29 && sense_hdr->ascq == 0x00)
> +			/*
> +			 * Unit Attention Code. This is the first IO
> +			 * to the new path, so just retry.
> +			 */
> +			return NEEDS_RETRY;
> +		break;
> +	}
> +
> +	/* success just means we do not care what scsi-ml does */
> +	return SUCCESS;
> +}
> +

Oh yeah, Ed could you tell me where sometimes a commend gets retried
over and over when a path is passive and can you tell me on what error
values it does this so I can add this in? Does the check_sense code
force the retry, or scsi_io_completion or the ULD?
-
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