mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jan Kara <jack@suse.cz>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH 0/3] Fix IO error reporting on fsync()
Date: Mon, 9 Oct 2006 13:40:41 +0200	[thread overview]
Message-ID: <20061009114040.GI17620@atrey.karlin.mff.cuni.cz> (raw)
In-Reply-To: <20061006230609.c04e78bc.akpm@osdl.org>

> On Fri, 6 Oct 2006 13:49:47 +0200
> Jan Kara <jack@suse.cz> wrote:
> 
> >   current code in buffer.c has two pitfalls that cause problems with IO
> > error reporting of filesystems using mapping->private_list for their
> > metadata buffers (e.g. ext2).
> >   The first problem is that end_io_async_write() does not mark IO error
> > in the buffer flags, only in the page flags. Hence fsync_buffers_list()
> > does not find out that some IO error has occured and will not report it.
> >   The second problem is that buffers from private_list can be freed
> > (e.g. under memory pressure) and if fsync_buffer_list() is called after
> > that moment, IO error is lost - note that metadata buffers mark AS_EIO
> > on the *device mapping* not on the inode mapping.
> >   Following series of three patches tries to fix these problems. The
> > approach I took (after some discussions with Andrew) is introducing
> > dummy buffer_head in the mapping instead of private_list. This dummy
> > buffer head serves as a head of metadata buffer list and also collects
> > IO errors from other buffers on the list (see the third patch for more
> > details). This is kind of compromise between introducing a pointer to
> > inode's address_space into each buffer and between using list_head
> > instead of buffer_head and playing some dirty tricks to recognize that
> > one particular list_head is actually from address_space and not from
> > buffer_head. Any suggestions for improvements welcome.
> 
> This is really complex, and enlarges the inode by quite a lot, which hurts.
  I agree (at least with the second part ;). I can write a patch which
keeps the inode size but the code will be uglier... Another possibility
is to put there just a buffer_head pointer and allocate buffer head
dynamically. That has an advantage that only filesystems using metadata_list
has to bear the memory cost...

> What about putting an address_space* into the buffer_head?  Transfer the
> EIO state into the address_space within, say, __remove_assoc_queue()?
  Yes, that's of course possible. But it enlarges each buffer head by 4
bytes (or 8 on 64-bit arch). Hmm, but you are right that on the systems
I've looked at this would actually be less memory. OK, I'll write this
version of the patch.
								Honza
-- 
Jan Kara <jack@suse.cz>
SuSE CR Labs

  reply	other threads:[~2006-10-09 11:41 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-06 11:49 Jan Kara
2006-10-06 11:55 ` [PATCH 1/3] " Jan Kara
2006-10-06 11:56 ` [PATCH 2/3] " Jan Kara
2006-10-06 11:57 ` [PATCH 3/3] " Jan Kara
2006-10-07  6:06 ` [PATCH 0/3] " Andrew Morton
2006-10-09 11:40   ` Jan Kara [this message]
2006-10-09 18:20     ` Andrew Morton
2006-10-10 11:56       ` Jan Kara
2006-10-09 14:47   ` [PATCH] Try to avoid a pessimistic vmalloc() recursion Eric Dumazet
2006-10-09 16:25     ` Nick Piggin
2006-10-09 19:43       ` Eric Dumazet

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=20061009114040.GI17620@atrey.karlin.mff.cuni.cz \
    --to=jack@suse.cz \
    --cc=akpm@osdl.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®