Re: Problems with sr_get_events

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

 



Hello, Alan.  Sorry about the delay.

On Sun, Apr 08, 2012 at 09:24:32AM -0400, Alan Stern wrote:
> There are several closely related issues involving sr_get_events().
> 
> The first may just be confusion on my part.  You've got a 
> cd->ignore_get_event flag, whose name seems to mean that the result 
> from sr_get_events() should be ignored.  But the result isn't ignored 
> entirely; only the DISK_EVENT_MEDIA_CHANGE bit is cleared.
>
> Furthermore, if you really do intend to ignore the result from 
> sr_get_events() then why call it in the first place?  Or does the flag 
> actually mean that you want to ignore the media-change bit from 
> get_events while still using the other bits?

The only thing which caused actual problem was media changed
detection.  This being a workaround for badly broken hardware, I think
it would be better to keep the behavior minmially deviated from the
normal path.  Let's say it's abbreviation of
->ignore_media_changed_from_get_event.

> Finally, the GET_EVENT_STATUS_NOTIFICATION command is not present in 
> all versions of SCSI, and not all drives support it.  sr_get_events() 
> should check for an ILLEGAL_REQUEST sense key and stop sending the 
> command if it is found.  Maybe a new flag will be needed for this.

Hmmm... Maybe but we've been sending GET_EVENT without such provision
for very long time now.  I feel reluctant to change something which
seems to work in this area even if that something is technically
wrong.  It's not like cheap USB devices tend to be technically correct
anyway.

Thanks.

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