Making Suspend Safer for File Systems
12 Jan 2009I saw these File System Freezing patches that got merged into Linus' tree yesterday and instantly thought that these patches could be used to freeze file systems before going into a suspended state. At the recent foss.in/2008, I met with Christoph Hellwig and one of the things we discussed was how he would never trust any file system to be in a consistent state after attempting suspend-to-disk.
The freezing patches are aimed at snapshotting as of now. Extending the suspend routines to make use of them is something I still have to look at. While working with file systems isn't entirely new to me -- I've worked on something called the Mosix File System earlier, it's been a really long time. It'll be quite interesting to work on this.
I had a brief chat with hch about this idea and while he says this still will not convince him to suspend to disk, it could be a good thing for suspend to ram where the laptop runs out of power but the fs could be in a good state. I agree. Though I'd like to use s-t-d with this!
I've had many ideas slip by without blogging about them for ages and later seen them implement by others. In this case, even if I don't end up implementing something, I'd at least have the satisfaction of having penned it down first.