Josha Foust wrote: <snip> > My main remaining concern is with the safe operation of the unload > command. As I mentioned in a previous email, the media changer is > perfectly happy to unload a disk from the drive while it is still > spinning, obviously causing damage to the disk and possibly the changer. > With the stop command that Dan Dennedy added in his patch to mtx, I can > get the drive stopped if I retry until the command succeeds. I am > worried about race conditions, however. Is there a way to lock a SCSI > device for exclusive access so that I can guarantee a safe unload? I.E. > that the disk stays stopped while the media changer unloads it. The PREVENT ALLOW MEDIUM REMOVAL command is defined for SMC devices (see SPC-3 as SPC-4 has devolved that command and it is yet to appear explicitly in SMC-3). That isn't exactly what you asked for but it will impede a START STOP UNIT (start_bit=0, loej_bit=1) command. <snip> Doug Gilbert - 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