Re: [PATCH] saved and restore result for timed out commands

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

 



On Mon, 16 May 2005, Patrick Mansfield wrote:

> Save and restore the scmd->result, so that timed out commands do not
> return the result of the TEST UNIT READY or the start/stop commands. Code
> is already in place to save and restore the result for the request sense
> case.
> 
> The previous version of this patch erroneously removed the "if" check,
> instead add a comment as to why the "if" is needed.

I can confirm that this patch does help; the correct status is now
returned to the sg user.  However there are still a few things that should
be fixed up:

First, this doesn't erase the sense data after error recovery.  I tried it 
with two different scenarios, one where the command returned a phase error 
and one where the command timed out.  In both cases the sg user got back a 
buffer with valid sense data, from the TUR commands issued by the error 
handler.  This could be highly misleading.

Second, as Patrick has noted, this doesn't prevent the error handler from 
issuing those TURs in the first place.  If some sort of Unit Attention 
came up, the sg user wouldn't be able to handle it correctly because the 
error handler would have swallowed it.  Of course, once this is fixed the 
first problem will no longer be an issue (no TUR, hence no unsolicited 
sense data).

Alan Stern

-
: 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