From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752301AbbKCALK (ORCPT ); Mon, 2 Nov 2015 19:11:10 -0500 Received: from ipmail07.adl2.internode.on.net ([150.101.137.131]:8177 "EHLO ipmail07.adl2.internode.on.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752025AbbKCALI (ORCPT ); Mon, 2 Nov 2015 19:11:08 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A2BvBwDn+jdW/+rW03ZXB4M7gUKqSQEBAQaLLoUlhgmGEwQCAoE1TQEBAQEBAYELhDYBAQQ6HCMQCAMYCSUPBSUDIROIL8F7AQEIAiEZhheFRYRIhHgBBJJQg3ONHYFhiFqOFoNyY4QYKjSENCOBJwEBAQ Date: Tue, 3 Nov 2015 11:10:53 +1100 From: Dave Chinner To: "Rafael J. Wysocki" Cc: Jiri Kosina , Alan Stern , Pavel Machek , "Rafael J. Wysocki" , Jan Kara , Christoph Hellwig , Linus Torvalds , Al Viro , Tejun Heo , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-pm@vger.kernel.org Subject: Re: [PATCH 0/3] PM, vfs: use filesystem freezing instead of kthread freezer Message-ID: <20151103001053.GL10656@dastard> References: <6015070.Gclh0s3EvS@vostro.rjw.lan> <2258525.D9qdTJBeTN@vostro.rjw.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2258525.D9qdTJBeTN@vostro.rjw.lan> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 02, 2015 at 03:43:07AM +0100, Rafael J. Wysocki wrote: > 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. Never going to work. There is no guarantee that a write to a filesystem by a third party device is going to change the superblock (or any metadata in the rest of the filesystem) in any detectable way. Hence freezing filesystems will not prevent Bad Things Happening if you do this while your system is suspended. Cheers, Dave. -- Dave Chinner david@fromorbit.com