]> git.baikalelectronics.ru Git - kernel.git/commit
ext2: report metadata errors during fsync
authorJan Kara <jack@suse.cz>
Wed, 16 Dec 2009 00:46:49 +0000 (16:46 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 16 Dec 2009 15:20:06 +0000 (07:20 -0800)
commit5475e950a74b41366ae1ba8046bb8f62ce070d4c
tree267f26b2f4945f8c03c12ddcbb9cd26c6e3e0ad0
parentfa64dd4c467ec021ae6f673f44735959c95f428a
ext2: report metadata errors during fsync

When an IO error happens while writing metadata buffers, we should better
report it and call ext2_error since the filesystem is probably no longer
consistent.  Sometimes such IO errors happen while flushing thread does
background writeback, the buffer gets later evicted from memory, and thus
the only trace of the error remains as AS_EIO bit set in blockdevice's
mapping.  So we check this bit in ext2_fsync and report the error although
we cannot be really sure which buffer we failed to write.

Signed-off-by: Jan Kara <jack@suse.cz>
Cc: Chris Mason <chris.mason@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/ext2/dir.c
fs/ext2/ext2.h
fs/ext2/file.c