On Sun, 18 Sep 2005, Mike Anderson wrote: > Since scsi_eh_wakeup can only be called on a completion or timeout of an IO > you cannot get a comparison when both are 0 (unless we have a bug > somewhere). This is now a moot point since James's most recent patch http://marc.theaimsgroup.com/?l=linux-scsi&m=112709424027012&w=2 but I'll answer it anyway. In the patch I originally wrote, the error handler always checked the condition shost_busy == shost_failed before going to sleep. So even without scsi_eh_wakeup being called, the error handler would fail to go to sleep when it originally started up, because both values were 0. > If the increment of host_failed, increment of host_busy, decrement of > host_busy, and the comparison of host_busy to host_failed is all under > the host_lock why would the atomic_t be better. They are not under the host_lock. Alan Stern - : 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