• Jan Kara's avatar
    ext2: report metadata errors during fsync · 48bde86d
    Jan Kara authored
    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: default avatarJan Kara <jack@suse.cz>
    Cc: Chris Mason <chris.mason@oracle.com>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    48bde86d
file.c 2.75 KB