On Sun, Feb 25, 2018 at 10:45:26AM +0100, Rafael J. Wysocki wrote: > On Sat, Feb 24, 2018 at 4:27 AM, Luis R. Rodriguez <mcgrof@xxxxxxxxxx> wrote: > > On Mon, Feb 05, 2018 at 09:28:37AM +0100, Rafael J. Wysocki wrote: > >> Moreover, during hibernation devices are suspended for two times (and > >> resumed in between, of course) whereas filesystems only need to be > >> "suspended" once. > > > > From your point of view yes, but actually internally the VFS layer or > > filesystems themselves may end up re-using this mechanism later for > > other things like -- snapshotting. And if some folks have it the way > > they want it, we may need a dependency map between filesystems anyway > > for filesystem specific reasons. > > That's orthogonal to what I said. <-- snip --> > However, *devices* are resumed after creating the image so that the > image itself can be written to persistent storage and are suspended > after that again before putting the system to sleep (for wakeup to > work, among other things). > > That's why suspend/resume of filesystems cannot be tied to > suspend/resume of devices. Ah, yes, I see your point now. So for filesystems we really don't care if its suspend or hibernation, we just need to freeze in the right order. So long as we get that order right we should be OK. Curious -- do we resume *all* devices after creating the image for hibernation today? Not that I am advocating using devices for this mechanism or resolution for filesystems, I'm just curious as we're on the topic. Luis