> It will make user confused if suspend operation is just failed because of > a usb mass storage device connected and some directories or files are open, > looks like it is a bit stupid, doesn't it?
It looks a lot MORE stupid if you allow the suspend to happen, but then destroy the data on the disk. > Just check for /media is still not enough too, someone may mount external > block devices under other directories. It doesn't have to be /media, but you can certainly figure out which devices are external USB storage devices. /proc/mounts would be a good place to start. Even in the current scheme, I've had Ubuntu totally screw up the external storage device stuff. I can have a terminal open to my external device, and then suspend/resume. The filesystem becomes inaccessible, and the current directory looks empty. The path given on the shell prompt now says "(unreachable)/whatever". Sometimes you have to cd out of the external device mount point and back into it, and sometimes the external device gets mounted under a different name (same UUID, but with a '_' appended to the name). In this situation, the old device has not gone away due to the filesystem still having a reference to it, and by this point the filesystem state is trashed. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/883748 Title: Suspend/resume corrupts external data storage devices To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/883748/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs