James: This patch series addresses the problems we've been discussing during the past week. The first patch is independent of the others. It fixes the issue of making scsi_wait_scan wait until all sd probing is finished. The next four are a bunch of cleanups of the existing device and target code. I found quite a few bugs along the way. One of those patches changes the meaning of starget->reap_ref, to make it count the number of underlying devices. The last patch changes reap_ref again, to count only visible underlying devices. The result is that scsi_target_reap() will remove a target from visibility whenever all its devices are invisible (unless someone has prevented it by temporarily increasing reap_ref). The target will also be unlinked from the host, but it won't be deallocated until all the devices have been freed. 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