• J
    ext2: report metadata errors during fsync · 48bde86d
    Jan Kara 提交于
    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: NJan Kara <jack@suse.cz>
    Cc: Chris Mason <chris.mason@oracle.com>
    Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
    48bde86d
ext2.h 6.3 KB