• Andrew Morton's avatar
    [PATCH] async write errors: report truncate and io errors on · fe7e689f
    Andrew Morton authored
    From: Oliver Xymoron <oxymoron@waste.org>
    
    These patches add the infrastructure for reporting asynchronous write errors
    to block devices to userspace.  Error which are detected due to pdflush or VM
    writeout are reported at the next fsync, fdatasync, or msync on the given
    file, and on close if the error occurs in time.
    
    We do this by propagating any errors into page->mapping->error when they are
    detected.  In fsync(), msync(), fdatasync() and close() we return that error
    and zero it out.
    
    
    The Open Group say close() _may_ fail if an I/O error occurred while reading
    from or writing to the file system.  Well, in this implementation close() can
    return -EIO or -ENOSPC.  And in that case it will succeed, not fail - perhaps
    that is what they meant.
    
    
    There are three patches in this series and testing has only been performed
    with all three applied.
    fe7e689f
inode.c 87.9 KB