Comment 3 for bug 883748

Revision history for this message
Steve (stevenm86) wrote : Re: Suspend/resume corrupts external data storage devices

First, problems can occur because there may be open files on the device when the system is suspended. Due to delays in enumeration, the external device will not immediately be back when the system is resumed. Thus, the effect is that of essentially unplugging the device without unmounting it first. Any processes that have files open on the device will now have an invalid file handle and will not be able to write to those files. While this alone may not immediately result in corruption at the filesystem level, it may certainly result in corruption or inconsistency at the data level (eg. if a process is writing related data to two files, one on the internal drive and one on an external drive, and the external drive suddenly goes away due to suspend).

Second, I am seeing logs in dmesg about how the filesystem was not unmounted cleanly (obviously) and also seeing journal replay. Removing the device after doing 'sync' should not really result in a journal replay unless disk inconsistency is happening, which is what I am seeing here.

Steve