On Mon, 2 Nov 2015, Jiri Kosina wrote: > On Mon, 2 Nov 2015, Rafael J. Wysocki wrote: > > BTW, the freezing of filesystems during system suspend (not hibernation) makes > > sense too, because it will help to address the long-standing issue with storage > > devices that go away while the system is suspended. > > > > I guess it may also helps to address the case when a device is removed from a > > suspended system, written to on another system in the meantime and inserted > > back into the (still suspended) original system which then is resumed. Today > > this is an almost guaranteed data corruption scenario, but if the filesystem in > > question is properly frozen during suspend, the driver should be able to detect > > superblock changes during unfreeze. I agree completely; adding filesystem freezing is a great idea. > > So the approach I'd suggest would be to add the freezing of filesystems to the > > suspend/resume code paths just for the above reasons and drop the kthreads > > freezing from the filesystems that support the proper freezing. The rest > > should be easier to deal with then. > > That alone makes sense. It'll however leave a load of freezer users in the > kernel that make no sense (one example picked completely out of the air: > w1_process(); what is the reason for it there?) and are likely broken > (completely random examples again: md, xfsaild -- they think they are > freezable, but they are not). If you fix just the kthreads which do this (along with an explanation in the changelog of why the kthread is wrong), while leaving the others alone, that ought to be acceptable. Alan Stern -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html