From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dave Chinner Subject: Re: [patch] fs: improved handling of page and buffer IO errors Date: Fri, 24 Oct 2008 09:48:04 +1100 Message-ID: <20081023224804.GD18495@disturbed> References: <20081021112137.GB12329@wotan.suse.de> <87mygxexev.fsf@basil.nowhere.org> <20081022103112.GA27862@wotan.suse.de> <20081022230715.GX18495@disturbed> <20081023070711.GB30765@wotan.suse.de> <20081023094416.GA6640@fogou.chygwyn.com> <20081023111500.GB7693@wotan.suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: steve@chygwyn.com, Andi Kleen , Andrew Morton , Linux Memory Management List , linux-fsdevel@vger.kernel.org To: Nick Piggin Return-path: Received: from ipmail01.adl6.internode.on.net ([203.16.214.146]:45073 "EHLO ipmail01.adl6.internode.on.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751895AbYJWWth (ORCPT ); Thu, 23 Oct 2008 18:49:37 -0400 Content-Disposition: inline In-Reply-To: <20081023111500.GB7693@wotan.suse.de> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Thu, Oct 23, 2008 at 01:15:00PM +0200, Nick Piggin wrote: > On Thu, Oct 23, 2008 at 10:44:16AM +0100, steve@chygwyn.com wrote: > > Hi, > > > > On Thu, Oct 23, 2008 at 09:07:11AM +0200, Nick Piggin wrote: > > > On Thu, Oct 23, 2008 at 10:07:15AM +1100, Dave Chinner wrote: > > [snip] > > > > > > > You could do the same thing for metadata read operations. e.g. build > > > > a large directory structure, then do read operations on it (readdir, > > > > stat, etc) and inject errors into each of those. All filesystems > > > > should return the (EIO) error to the application in this case. > > > > > > > > Those two cases should be pretty generic and deterministic - they > > > > both avoid the difficult problem of determining what the response > > > > to an I/O error during metadata modifcation should be.... > > > > > > Good suggestion. > > > > > > I'll see what I can do. I'm using the fault injection stuff, which I > > > don't think can distinguish metadata, so I might just have to work > > > out a bio flag or something we can send down to the block layer to > > > distinguish. > > > > > > Thanks, > > > Nick > > > > > > > Don't we already have such a flag? I know that its not set in all > > the correct places in GFS2 so far, but I've gradually been fixing > > them to include BIO_RW_META where appropriate. > > That should probably work. It seems to be very incomplete (GFS2 > being one of the few exceptions). Though adding more support in > ext2 and buffer layer should be enough for me to start with, > and shouldn't be too hard. I've posted patches to tag XFS metadata with BIO_RW_META in the past, but that patch set had performance implications for different I/O schedulers so it never went further than just a patch. If I leave all the BIO_RW_SYNC tagging for the metadata bios, then a single line change to add BIO_RW_META should not have any performance impact.... Cheers, Dave. -- Dave Chinner david@fromorbit.com