Re: [PATCH] sd: improve logic and efficiecy of media-change detection

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

 



James:

I'm still awaiting some feedback on this patch submission:

	http://marc.info/?l=linux-scsi&m=128387424521838&w=2

> This patch (as1415) improves the formerly incomprehensible logic in
> sd_media_changed() (the current code refers to "changed" as a state,
> whereas in fact it is a relation between two states).  It also adds a
> big comment so that everyone can understand what is really going on.
> 
> The patch also improves efficiency by not reporting a media change
> when no medium was ever present.  If no medium was present the last
> time we checked and there's still no medium, it's not necessary to
> tell the caller that a change occurred.  Doing so merely causes the
> caller to attempt to revalidate a non-existent disk, which is a waste
> of time.

While not critically important, it does fix a bug: It gets rid of 
excess I/O (attempts to probe a drive with no medium currently 
generate two TEST UNIT READY commands, but only one is needed).

Alan Stern

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