Re: [PATCH 1/3] scsi: Fix erratic device offline during EH

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

 



On 9/2/2013 6:58 AM, Hannes Reinecke wrote:

> +static int scsi_eh_action(struct scsi_cmnd *scmd, int rtn) +{ +	static
> unsigned char tur_command[6] = {TEST_UNIT_READY, 0, 0, 0, 0, 0}; + +	if
> (scmd->request->cmd_type != REQ_TYPE_BLOCK_PC) { +		struct scsi_driver
> *sdrv = scsi_cmd_to_driver(scmd); +		if (sdrv->eh_action) +			rtn =
> sdrv->eh_action(scmd, tur_command, 6, rtn); +	} +	return rtn; +} +

	Is there are reason for using TUR here instead of STD inquiry? STD inquiry has
the advantage that it can act like a "ping" but doesn't return unit
attentions.

	Per my previous comments, trapping unit attentions in the error handler has
caused UA's like luns changed, or power loss to get lost without being
processed. For tape devices loosing UA's like this often means that the higher
level driver won't be notified that the tape is rewound, resulting in serious
issues.
--
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