[lkml]   [2006]   [Oct]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Subject[PATCH 0/3] Fix IO error reporting on fsync()

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.

Jan Kara <>
SuSE CR Labs
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2006-10-06 13:53    [W:0.149 / U:1.444 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site