Most recent kernel where this bug did not occur: 2.6.16 Distribution: Debian and Gentoo Hardware Environment: HP PA 712/80 Software Environment: Debian GNU/Linux Problem Description: When you spin down a SCSI drive using sdparm -C stop /dev/sda or scsi-spin -f -d /dev/sda, all is well. When some process accessess the disk, the kernel generates an I/O error. Correct behavior would be to spin the disk back up and complete the request. Seems to me like, before each read/write command, a simple check to see if the disk is in spindown-mode is all it takes. Steps to reproduce: 1) Spin down a mounted scsi device using sdparm or scsi-spin 2) Try to access some file on that filesystem. IDE devices do not seem to have this problem. I can power down /dev/hda using hdparm -y /dev/hda. Accessing a file makes the disk spin back up.
Created attachment 8264 [details] Patch to allow scsi-restart when spindown Written by Brian King
This bug has been posted to linux-scsi mailing list, and a patch has been submitted by Brian King. This issue is RESOLVED. I hope this patch gets into mainstream :-)