mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Richard Purdie <rpurdie@rpsys.net>
To: LKML <linux-kernel@vger.kernel.org>
Subject: end_swap_bio_write error handling
Date: Tue, 29 Aug 2006 21:48:34 +0100	[thread overview]
Message-ID: <1156884514.5600.70.camel@localhost.localdomain> (raw)

I've been experimenting with a swap block device driver which under
certain conditions generates write failures for pages. I'd presumed the
kernel would recover from a write error by restoring the copy it still
has in memory. In an ideal world it would then mark that page of the
swap device as bad although I'm fairly sure this doesn't happen. I'm not
sure about the restoring the in memory page but if it does happen, I'm
having trouble identifying the code.

When I tested this, it doesn't appear to recover and processes on the
system, presumably the ones using swap just disappear when write
failures occur.

end_swap_bio_write() simply does:

if (!uptodate)
	SetPageError(page);

I know the uptodate flag is being cleared in the error cases. I'm having
trouble working out which code the setting of an error flag for a swap
page should trigger (any pointers appreciated!). I noticed its also used
for the read case which is unrecoverable.

Should this code be marking the page as dirty and the section of the
swap device as bad instead, does it already do that or is that not
possible for some reason?

Any comments and/or pointers to documentation on this would be
appreciated.

Thanks,

Richard


             reply	other threads:[~2006-08-29 20:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-29 20:48 Richard Purdie [this message]
2006-08-31  1:58 ` KAMEZAWA Hiroyuki
2006-08-31  8:05   ` Richard Purdie

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=1156884514.5600.70.camel@localhost.localdomain \
    --to=rpurdie@rpsys.net \
    --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®