Making Suspend Safer for File Systems

I 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, 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.

3 Replies to “Making Suspend Safer for File Systems”

  1. >These patches still do not solve the issues with already deployed file systems which are many out there for critical setups.And they can not afford to change file system for quite some time now. They will need loadable kernel module which can do this trick and if you have that module you do not need to add this support in FS itself. You can always provide it as add-on or something.

  2. >If we’re talking servers then they’ll definitely have their own way of snapshotting.

    I’m mostly interested in this capability from the desktop/laptop use-case.

    Also, as ‘michaeljt’ explains at [1], it can also be used for online fsck.


  3. >I am not sure if I understand it correctly but how can this allow online fsck ? I mean to be of real use for fsck , we should be in a position to freeze the system for long time. Long enough so that fsck gets completed. Now we can not freeze the file system , take snapshot and then run fsck on it and may be later merge snapshot with original volume but then it will not be online fsck in that case.May be in night time for laptops you can freeze the file system and online fsck gets completed.. Well the patch also need to update already-read-but-not-modified-buffers if they get modified during fsck but this should be part of online fsck implementation and we should not bother about it .. yeah in that case it might work for laptops/desktop. But my system is always doing some scheduled operation(antivirus scan,download, backup) in night time and if nothing else World Community Grid agent kicks in …

Leave a Reply

Your email address will not be published. Required fields are marked *