From: "Theodore Ts'o" <tytso@mit.edu>
To: Andrew Morton <akpm@digeo.com>
Cc: Ross Biro <rossb@google.com>, linux-kernel@vger.kernel.org
Subject: Re: [BUG] Failed writes marked clean?
Date: Fri, 8 Nov 2002 18:35:30 -0500 [thread overview]
Message-ID: <20021108233530.GA23888@think.thunk.org> (raw)
In-Reply-To: <3DCC252F.65C0F70B@digeo.com>
On Fri, Nov 08, 2002 at 12:57:19PM -0800, Andrew Morton wrote:
> Well before going and changing stuff, we need to decide what to
> change it _to_. What do we want to happen if there's a read error?
> And a write error?
>
> For reads, it makes sense for the page/buffer to be left not uptodate,
> and return an error.
In some circumstances, it may actually make sense to try writing a
random block of data to the disk, since that may force the disk to
remap the block. (Disks generally only remap a block from the pool of
spare blocks on writes, not on reads.)
Unfortuantely, if the error was just a transient one, you might end up
smashing the block when you write random garbage in an attempt to
remap the block. So perhaps the answer is to retry the read, and if
that fails, *then* try to do a forced rewrite of the block.
The next question is whether to do this in userspace or in the kernel.
And if in the kernel, whether it should be done at the device driver
layer, or in the block I/O layer, or in the filesystem?
I can make a case for doing it in userspace, since that gives us the
most amount of flexibility, and it gives us ample opportunity to do
special things, such as paging an operator for help, etc. On the
other hand, there are arguments for doing it in the kernel. It may be
that an appropriately clever filesystem might be able to do more
intelligent recovery while keeping the filesystem mounted.
- Ted
next prev parent reply other threads:[~2002-11-08 23:29 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-11-08 20:29 [BUG] Failed writes marked clean? Ross Biro
2002-11-08 20:53 ` Linus Torvalds
2002-11-08 20:57 ` Andrew Morton
2002-11-08 21:30 ` Ross Biro
2002-11-08 23:35 ` Theodore Ts'o [this message]
2002-11-09 1:29 ` Bernd Eckenfels
2002-11-12 20:04 ` Pavel Machek
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=20021108233530.GA23888@think.thunk.org \
--to=tytso@mit.edu \
--cc=akpm@digeo.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rossb@google.com \
/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