Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932121AbbKBPSQ (ORCPT ); Mon, 2 Nov 2015 10:18:16 -0500 Received: from iolanthe.rowland.org ([192.131.102.54]:40709 "HELO iolanthe.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1753588AbbKBPSN (ORCPT ); Mon, 2 Nov 2015 10:18:13 -0500 Date: Mon, 2 Nov 2015 10:18:12 -0500 (EST) From: Alan Stern X-X-Sender: stern@iolanthe.rowland.org To: Jiri Kosina cc: "Rafael J. Wysocki" , Pavel Machek , "Rafael J. Wysocki" , Dave Chinner , Jan Kara , Christoph Hellwig , Linus Torvalds , Al Viro , Tejun Heo , , , Subject: Re: [PATCH 0/3] PM, vfs: use filesystem freezing instead of kthread freezer In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1886 Lines: 39 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-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/