kernel-ark/fs
Andrew Morton c64610ba58 [PATCH] block_read_full_page() get_block() error handling fix
If block_read_full_page() detects an error when running get_block() it will
run SetPageError(), then it will zero out the block in pagecache and will mark
the buffer_head uptodate.

So at the end of readahead we end up with a non-uptodate pagecache page which
is marked PageError.  But it has uptodate buffers.

The pagefault code will run ClearPageError, will launch readpage a second time
and block_read_full_page() will notice the uptodate buffers and will mark the
page uptodate as well.  We end up with an uptodate, !PageError page full of
zeros and the error is lost.

(It seems a little odd that filemap_nopage() runs ClearPageError().  I guess
all of this adds up to meaning that for each attempted access to the page, the
pagefault handler will retry the I/O.  Which is good and bad.  If the app is
ignoring SIGBUS for some reason we could get a lot of back-to-back I/O
errors.)

Fix it by not marking the pagecache buffer_head as uptodate if the attempt to
map that buffer to a disk block failed.

Credit-to: Qu Fuping <fs@ercist.iscas.ac.cn>

  For reporting the bug and identifying its source.

Signed-off-by: Qu Fuping <fs@ercist.iscas.ac.cn>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-17 07:59:20 -07:00
..
adfs
affs
afs
autofs
autofs4
befs
bfs
cifs [PATCH] remove BK documentation 2005-05-05 16:36:42 -07:00
coda
cramfs
debugfs
devfs
devpts
efs
exportfs
ext2
ext3 [PATCH] revert ext3-writepages-support-for-writeback-mode 2005-05-05 16:36:44 -07:00
fat
freevxfs
hfs
hfsplus
hostfs [PATCH] uml: hostfs failed mount handling 2005-05-05 16:36:37 -07:00
hpfs
hppfs
hugetlbfs
isofs
jbd
jffs
jffs2 [PATCH] make some things static 2005-05-05 16:36:47 -07:00
jfs
lockd
minix
msdos
ncpfs
nfs [PATCH] make some things static 2005-05-05 16:36:47 -07:00
nfsd
nls [PATCH] make some things static 2005-05-05 16:36:47 -07:00
ntfs
openpromfs
partitions [PATCH] revert msdos partitioning fix 2005-05-06 22:09:27 -07:00
proc [PATCH] fix impossible VmallocChunk 2005-05-17 07:59:10 -07:00
qnx4
ramfs
reiserfs [PATCH] reiserfs: use NULL instead of 0 2005-05-05 16:36:48 -07:00
romfs
smbfs
sysfs
sysv
udf [PATCH] fs/udf/udftime.c: fix off by one error 2005-05-05 16:36:51 -07:00
ufs
umsdos
vfat
xfs [XFS] Cleanup use of loff_t vs xfs_off_t in the core code. 2005-05-05 13:33:40 -07:00
aio.c
attr.c
bad_inode.c [PATCH] make some things static 2005-05-05 16:36:47 -07:00
binfmt_aout.c
binfmt_elf_fdpic.c
binfmt_elf.c [PATCH] fix Linux kernel ELF core dump privilege elevation 2005-05-16 21:07:05 -07:00
binfmt_em86.c
binfmt_flat.c
binfmt_misc.c
binfmt_script.c
binfmt_som.c
bio.c
block_dev.c [PATCH] remove do_sync parameter from __invalidate_device 2005-05-05 16:36:44 -07:00
buffer.c [PATCH] block_read_full_page() get_block() error handling fix 2005-05-17 07:59:20 -07:00
char_dev.c [PATCH] make some things static 2005-05-05 16:36:47 -07:00
compat_ioctl.c
compat.c
dcache.c [PATCH] make some things static 2005-05-05 16:36:47 -07:00
dcookies.c
direct-io.c
dnotify.c
dquot.c
eventpoll.c [PATCH] make some things static 2005-05-05 16:36:47 -07:00
exec.c [PATCH] comments on locking of task->comm 2005-05-05 16:36:48 -07:00
fcntl.c
fifo.c
file_table.c
file.c
filesystems.c
fs-writeback.c
inode.c [PATCH] remove do_sync parameter from __invalidate_device 2005-05-05 16:36:44 -07:00
ioctl.c
Kconfig
Kconfig.binfmt
libfs.c
locks.c [PATCH] make some things static 2005-05-05 16:36:47 -07:00
Makefile
mbcache.c [PATCH] make some things static 2005-05-05 16:36:47 -07:00
mpage.c [PATCH] make some things static 2005-05-05 16:36:47 -07:00
namei.c [PATCH] make some things static 2005-05-05 16:36:47 -07:00
namespace.c
nfsctl.c
open.c
pipe.c
posix_acl.c
quota_v1.c
quota_v2.c
quota.c
read_write.c
readdir.c
select.c [PATCH] make some things static 2005-05-05 16:36:47 -07:00
seq_file.c
stat.c
super.c
xattr_acl.c
xattr.c