All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@zip.com.au>
To: Zwane Mwaikambo <zwane@linux.realnet.co.sz>
Cc: Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: (2.5.23) buffer layer error at buffer.c:2326
Date: Wed, 19 Jun 2002 13:02:32 -0700	[thread overview]
Message-ID: <3D10E358.D82DB604@zip.com.au> (raw)
In-Reply-To: Pine.LNX.4.44.0206192007210.1263-100000@netfinity.realnet.co.sz

Zwane Mwaikambo wrote:
> 
> The ide drive holding the mounted filesystem dropped out of DMA and then
> spewed the following a number of times. Anyone interested?
> 
>  buffer layer error at buffer.c:2326

y'know, just this morning I was thinking it may be time to pull the
debug code out of buffer.c.  Silly me.

So we had a non-uptodate buffer against an uptodate page.  Were
there any other messages in the logs?  I'd have expected a
"buffer IO error" to come out first?

Looking at the code, it seems likely that you hit an I/O error
on a write.  That will leave the page uptodate, but with PageError
set.  And the buffer is marked not uptodate, which is silly, because the
buffer _is_ uptodate.

What this says is: I still need to get down and set up a fault simulator
and make sure that we're doing all the right things when I/O errors occur.

Does anyone have any opinions on what the kernel's behaviour should
be in the presence of a write I/O error?  Our options appear to be:

1: Just drop the data.  That's what we do now.

2: Mark it dirty again, so it gets written indefinitely

3: Mark the page dirty again, but also set PageError.  So we
   attempt to write the same blocks a second time only.  Then
   drop the data.

4: (Just thought of this): mark the page PageError and PageDirty,
   and unmap it from disk.  So when it gets written again, the
   filesystem's get_block function will be called.  It can look at
   PageError(bh_result->b_page) and say "hey, I need to find a
   different set of blocks for this page".  The bad blocks will
   just be leaked.

   To back that up: if we get an IO error and the page is _already_
   PageError, give up.  Mark it clean and lose the data.  This gives the
   fs the option of clearing PageError inside get_block(), so it will end
   up trying every block on the disk.

   Pretty sneaky, I think.  But it only works for file data.  If the
   blocks are for metadata, we're screwed..

-

  reply	other threads:[~2002-06-19 20:04 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-06-19 18:10 (2.5.23) buffer layer error at buffer.c:2326 Zwane Mwaikambo
2002-06-19 20:02 ` Andrew Morton [this message]
2002-06-19 20:25   ` Anton Altaparmakov
2002-06-19 21:54   ` Roman Zippel
2002-06-20  6:07   ` Zwane Mwaikambo
2002-06-20 11:50   ` Stephen C. Tweedie
2002-06-20 13:22     ` Brad Hards
2002-06-20 13:49       ` Dave Jones

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=3D10E358.D82DB604@zip.com.au \
    --to=akpm@zip.com.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=zwane@linux.realnet.co.sz \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.