From: Jeff Moyer <jmoyer@redhat.com>
To: Linux Mailing <linux-kernel@vger.kernel.org>
Cc: Andrew Morton <akpm@liux-foundation.org>
Subject: [patch, rfc] do_generic_file_read: clear page errors when issuing a fresh read of the page
Date: Fri, 23 Jan 2009 14:27:48 -0500 [thread overview]
Message-ID: <x49d4edesaz.fsf@segfault.boston.devel.redhat.com> (raw)
Hi,
In testing older kernels, I've seen I/O errors set PG_error for the page
cache page (for a failure of the last path in a mulitpath setup). Then,
when the device is back online, the page error is never cleared, so all
reads from the previously bad disk location fail. You can actually get
around this by simply mmap()ing the file (the device node, in my case)
and accessing the page that way, as filemap_fault will clear the page
error bit.
So, hopefully this patch makes sense. As implied above, I haven't
verified empirically that this is the case on newer kernels (though,
from code inspection, it looks to still be a problem). I'll try to
reproduce the problem, but just in case I can't, I wanted to get this
rfc out there.
Cheers,
Jeff
diff --git a/mm/filemap.c b/mm/filemap.c
index 0e77f4a..3adafc8 100644
--- a/mm/filemap.c
+++ b/mm/filemap.c
@@ -1139,6 +1139,12 @@ page_not_up_to_date_locked:
}
readpage:
+ /*
+ * If there was an I/O error flagged previously, clear it
+ * here. PG_error will be set again if the readpage fails.
+ */
+ ClearPageError(page);
+
/* Start the actual read. The read will unlock the page. */
error = mapping->a_ops->readpage(filp, page);
reply other threads:[~2009-01-23 19:28 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=x49d4edesaz.fsf@segfault.boston.devel.redhat.com \
--to=jmoyer@redhat.com \
--cc=akpm@liux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
/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
all inboxes | Powered by JetHome®