On Tue, 4 Mar 2008, Stefan Richter wrote: > >> On Mon, 2008-03-03 at 15:16 -0500, Alan Stern wrote: > >>> This count > >>> will be used by usb-storage to determine whether USB-PERSIST should be > >>> forced on during a suspend. > > Why should devices without openers be treated differently from devices > with openers? It's not the openers themselves that matter; it's whether or not the device contains a mounted filesystem. I'm using the openers as a proxy for that. If you can suggest a better approach, I'd like to hear it. Devices containing a mounted filesystem need special treatment to avoid being disconnected when power is lost during a system suspend or hibernation. In principle this special treatment could be extended to all USB devices, whether mounted or not. However the USB spec says not to do it. Really it's a tradeoff. If power goes out during a suspend and a device with a mounted filesystem is disconnected as a result, there's a very high risk of data loss. Conversely, if the user replaces the medium while the system is asleep and the kernel doesn't realize it, then upon waking the data on the new medium will be corrupted. After suffering from exactly this sort of data loss, Linus decreed that the kernel should automatically avoid disconnecting devices with mounted filesystems, even though it contradicts the spec. So I need a way to know whether anything is mounted on a device below a SCSI host. 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