Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1423109AbWJYIOE (ORCPT ); Wed, 25 Oct 2006 04:14:04 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1423104AbWJYIOE (ORCPT ); Wed, 25 Oct 2006 04:14:04 -0400 Received: from ogre.sisk.pl ([217.79.144.158]:17105 "EHLO ogre.sisk.pl") by vger.kernel.org with ESMTP id S1423109AbWJYIOB (ORCPT ); Wed, 25 Oct 2006 04:14:01 -0400 From: "Rafael J. Wysocki" To: David Chinner Subject: Re: [PATCH] Freeze bdevs when freezing processes. Date: Wed, 25 Oct 2006 10:12:58 +0200 User-Agent: KMail/1.9.1 Cc: Pavel Machek , Nigel Cunningham , Andrew Morton , LKML , xfs@oss.sgi.com References: <1161576735.3466.7.camel@nigel.suspend2.net> <20061024213737.GD5662@elf.ucw.cz> <20061025001331.GP8394166@melbourne.sgi.com> In-Reply-To: <20061025001331.GP8394166@melbourne.sgi.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200610251012.59047.rjw@sisk.pl> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1766 Lines: 44 On Wednesday, 25 October 2006 02:13, David Chinner wrote: > On Tue, Oct 24, 2006 at 11:37:37PM +0200, Pavel Machek wrote: > > Hi! > > > > > > Do you mean calling sys_sync() after the userspace has been frozen > > > > may not be sufficient? > > > > > > In most cases it probably is, but sys_sync() doesn't provide any > > > guarantees that the filesystem is not being used or written to after > > > it completes. Given that every so often I hear about an XFS filesystem > > > that was corrupted by suspend, I don't think this is sufficient... > > > > Userspace is frozen. There's noone that can write to the XFS > > filesystem. > > Sure, no new userspace processes can write data, but what about the > internal state of the filesystem? > > All a sync guarantees is that the filesystem is consistent when the > sync returns and XFS provides this guarantee by writing all data and > ensuring all metadata changes are logged so if a crash occurs it can > be recovered (which provides the sync guarantee). hence after a > sys_sync(), XFS will still have lots of dirty metadata that needs to > be written to disk at some time in the future so the transactions > can be removed from the log. > > This dirty metadata can be flushed at any time, and the dirty state > is kept in XFS structures and not always in page structures (think > multipage metadata buffers). Are the dirty metadata flushed by a kernel thread? Greetings, Rafael -- You never change things by fighting the existing reality. R. Buckminster Fuller - 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/