On Mon, 19 Nov 2007, Matthew Wilcox wrote: > On Mon, Nov 19, 2007 at 02:16:12PM -0500, Alan Stern wrote: > > Regarding this thread's original question, the best idea I've come up > > with so far is to store an extra flag in the scsi_device structure > > indicating that a suspend or resume transition is underway. When the > > flag is set, commands with REQ_PREEMPT would be accepted. If the > > device is "suspended" and the flag is clear, then commands would be > > delayed or killed in the prep function regardless of REQ_PREEMPT. This > > scheme could potentially let unwanted commands go through, but I > > haven't been able to think of anything more suitable. > > You could allow only START_STOP and TUR to go through? That's a pretty good idea... There will be other problems to sort out. For example, if someone is using a SCSI cdrom drive to play an audio CD, it will appear to the system that the drive is idle because no commands will flow. But that sort of thing can be handled later. 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