summaryrefslogtreecommitdiff
path: root/include/linux/buffer_head.h
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2006-10-17 11:10:19 +0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-17 19:18:46 +0400
commit58ff407bee5a55f9c1188a3f9d70ffc79485183c (patch)
tree58132c31553a16b09e10f876561cd9ff1132fa77 /include/linux/buffer_head.h
parentd343fce148a4eee24a907a05c4101d3268045aae (diff)
downloadlinux-58ff407bee5a55f9c1188a3f9d70ffc79485183c.tar.xz
[PATCH] Fix IO error reporting on fsync()
When IO error happens on metadata buffer, buffer is freed from memory and later fsync() is called, filesystems like ext2 fail to report EIO. We solve the problem by introducing a pointer to associated address space into the buffer_head. When a buffer is removed from a list of metadata buffers associated with an address space, IO error is transferred from the buffer to the address space, so that fsync can later report it. Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux/buffer_head.h')
-rw-r--r--include/linux/buffer_head.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/buffer_head.h b/include/linux/buffer_head.h
index 131ffd37e716..5d9fb0e94156 100644
--- a/include/linux/buffer_head.h
+++ b/include/linux/buffer_head.h
@@ -69,6 +69,8 @@ struct buffer_head {
bh_end_io_t *b_end_io; /* I/O completion */
void *b_private; /* reserved for b_end_io */
struct list_head b_assoc_buffers; /* associated with another mapping */
+ struct address_space *b_assoc_map; /* mapping this buffer is
+ associated with */
atomic_t b_count; /* users using this buffer_head */
};