summaryrefslogtreecommitdiffstats
path: root/include/scsi
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2010-09-07 11:44:01 -0400
committerJames Bottomley <James.Bottomley@suse.de>2010-12-21 12:23:52 -0600
commit3ff5588d3f8afad65ded52ac0e4191462fe034cb (patch)
treed75858a35c3f9042dc234e17772fe9d713e2ca9c /include/scsi
parent29687512c0b084957112cc2c0743ce34cd0d5055 (diff)
downloadop-kernel-dev-3ff5588d3f8afad65ded52ac0e4191462fe034cb.zip
op-kernel-dev-3ff5588d3f8afad65ded52ac0e4191462fe034cb.tar.gz
[SCSI] sd: improve logic and efficiecy of media-change detection
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. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'include/scsi')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud