From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jens Axboe Subject: Re: XFS corruption during power-blackout Date: Fri, 1 Jul 2005 14:56:58 +0200 Message-ID: <20050701125657.GH2243@suse.de> References: <254889.27725ab660aa106eb6acc07307d71ef1fbd5b6fd366aebef9e2f611750fbcb467e46e8a4.IBX@taniwha.stupidest.org> <054069.b93858d6b97c07747dc32be2dd8981b254d981528781006053dce7be58de88865a43b162.IBX@taniwha.stupidest.org> <20050630194437.GC8374@wohnheim.fh-wedel.de> <947885.634f7bc00f9a47e9c90ffbeec9ebb14a812e2dab7a64e2d09cedc7aa2589ffaf3593543a.IBX@taniwha.stupidest.org> <42C538DC.4070000@emc.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Chris Wedgwood , J?rn Engel , Bryan Henderson , Al Boldi , linux-fsdevel@vger.kernel.org, linux-xfs@oss.sgi.com, Steve Lord , 'Nathan Scott' , reiserfs-list@namesys.com Return-path: list-help: list-unsubscribe: list-post: Errors-To: flx@namesys.com To: Ric Wheeler Content-Disposition: inline In-Reply-To: <42C538DC.4070000@emc.com> List-Id: linux-fsdevel.vger.kernel.org On Fri, Jul 01 2005, Ric Wheeler wrote: > Chris Wedgwood wrote: > > >On Thu, Jun 30, 2005 at 09:44:37PM +0200, J?rn Engel wrote: > > > > > > > >>Or do you rather mean that a single sync() should block until all data > >>currently present is hardened? > >> > >> > > > >Logically sync() should return only after all dirty buffers that > >existed before sync() was called are flushed. > > > >Anything more than this (i.e. waiting on newly (since sync was called > >but before it returns) dirtied buffers) could live-lock (actually, > >this used to happen sometimes, I don't know if that's the case). > > > > > I think that we need one more stage in sync() behavior to make sure that > the data is safely on the platter. For file systems with supported > write barriers, the last IO should be wrapped with a barrier to flush > the disk cache. > > It doesn't seem that sync() does that in today's code. That is true, sync() really only guarantees that the io has been issued and the drive signalled completion, with write back caching on it might not be on platter yet. -- Jens Axboe