linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nick Piggin <npiggin@suse.de>
To: Miklos Szeredi <miklos@szeredi.hu>
Cc: akpm@linux-foundation.org, linux-mm@kvack.org,
	linux-fsdevel@vger.kernel.org
Subject: Re: [patch] fs: improved handling of page and buffer IO errors
Date: Wed, 22 Oct 2008 15:16:48 +0200	[thread overview]
Message-ID: <20081022131648.GA20625@wotan.suse.de> (raw)
In-Reply-To: <E1KsGj7-0005sK-Uq@pomaz-ex.szeredi.hu>

On Tue, Oct 21, 2008 at 02:52:45PM +0200, Miklos Szeredi wrote:
> On Tue, 21 Oct 2008, Nick Piggin wrote:
> > IO error handling in the core mm/fs still doesn't seem perfect, but with
> > the recent round of patches and this one, it should be getting on the
> > right track.
> > 
> > I kind of get the feeling some people would rather forget about all this
> > and brush it under the carpet. Hopefully I'm mistaken, but if anybody
> > disagrees with my assertion that error handling, and data integrity
> > semantics are first-class correctness issues, and therefore are more
> > important than all other non-correctness problems... speak now and let's
> > discuss that, please.
> 
> I agree that error handling is important.  But careful: some
> filesystems (NFS I know) don't set PG_error on async read errors, and
> changing the semantics of ->readpage() from returning EIO to retrying
> will potentially cause infinite loops.  And no casual testing will

OK, they'll just need to be fixed.


> reveal those because peristent read errors are extremely rare.

Same as other read errors I guess. We need to be doing more testing
of error cases. I've been doing it a little bit recently for a couple
of block based filesystems... but the hardest code I think is actually
ensuring each filesystem actually does sane things.
  

> So I think a better aproach would be to do
> 
> 			error = lock_page_killable(page);
> 			if (unlikely(error))
> 				goto readpage_error;
> 			if (PageError(page) || !PageUptodate(page)) {
> 				unlock_page(page);
> 				shrink_readahead_size_eio(filp, ra);
> 				error = -EIO;
> 				goto readpage_error;
> 			}
> 			if (!page->mapping) {
> 				unlock_page(page);
> 				page_cache_release(page);
> 				goto find_page;
> 			}
> 
> etc...
> 
> Is there a case where retrying in case of !PageUptodate() makes any
> sense?

Invalidate I guess is covered now (I don't exactly like the solution,
but it's what we have for now). Truncate hmm, I thought that still
clears PageUptodate, but it doesn't seem to either?

Maybe we can use !PageUptodate, with care, for read errors. It might 
actually be a bit preferable in the sense that PageError can just be
used for write errors only.


  parent reply	other threads:[~2008-10-22 13:16 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-21 11:21 [patch] fs: improved handling of page and buffer IO errors Nick Piggin
2008-10-21 12:52 ` Miklos Szeredi
2008-10-21 12:59   ` steve
2008-10-21 13:14     ` Miklos Szeredi
2008-10-21 13:38       ` steve
2008-10-21 14:32         ` Miklos Szeredi
2008-10-21 15:09           ` steve
2008-10-21 16:13             ` Miklos Szeredi
2008-10-22 12:51               ` Jamie Lokier
2008-10-22 14:08                 ` Miklos Szeredi
2008-10-21 14:35         ` Evgeniy Polyakov
2008-10-21 14:59           ` steve
2008-10-21 16:20             ` Miklos Szeredi
2008-10-21 16:25               ` steve
2008-10-21 16:28               ` Miklos Szeredi
2008-10-21 16:29                 ` Matthew Wilcox
2008-10-22 12:48                   ` Jamie Lokier
2008-10-22 13:45                     ` Matthew Wilcox
2008-10-22 14:02                       ` Miklos Szeredi
2008-10-22 14:35                         ` Matthew Wilcox
2008-10-22 14:45                           ` Miklos Szeredi
2008-10-23 13:48                             ` Matthew Wilcox
2008-10-22 22:23     ` Mark Fasheh
2008-10-23  9:59       ` steve
2008-10-23 10:21         ` Nick Piggin
2008-10-23 10:52           ` steve
2008-10-23 11:07             ` Nick Piggin
2008-10-22 13:16   ` Nick Piggin [this message]
2008-10-22 20:09     ` Miklos Szeredi
2008-10-21 16:16 ` Andi Kleen
2008-10-21 16:30   ` steve
2008-10-22 10:31   ` Nick Piggin
2008-10-22 18:46     ` Brad Boyer
2008-10-22 20:19       ` Andi Kleen
2008-10-23  7:08       ` Nick Piggin
2008-10-22 23:07     ` Dave Chinner
2008-10-23  7:07       ` Nick Piggin
2008-10-23  9:44         ` steve
2008-10-23 11:15           ` Nick Piggin
2008-10-23 22:48             ` Dave Chinner
2008-10-24  1:05               ` Nick Piggin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20081022131648.GA20625@wotan.suse.de \
    --to=npiggin@suse.de \
    --cc=akpm@linux-foundation.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=miklos@szeredi.hu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).