• Dave Chinner's avatar
    xfs: handle buffer log item IO errors directly · 428947e9
    Dave Chinner authored
    Currently when a buffer with attached log items has an IO error
    it called ->iop_error for each attched log item. These all call
    xfs_set_li_failed() to handle the error, but we are about to change
    the way log items manage buffers. hence we first need to remove the
    per-item dependency on buffer handling done by xfs_set_li_failed().
    
    We already have specific buffer type IO completion routines, so move
    the log item error handling out of the generic error handling and
    into the log item specific functions so we can implement per-type
    error handling easily.
    
    This requires a more complex return value from the error handling
    code so that we can take the correct action the failure handling
    requires.  This results in some repeated boilerplate in the
    functions, but that can be cleaned up later once all the changes
    cascade through this code.
    Signed-off-by: default avatarDave Chinner <dchinner@redhat.com>
    Reviewed-by: default avatarBrian Foster <bfoster@redhat.com>
    Reviewed-by: default avatarDarrick J. Wong <darrick.wong@oracle.com>
    Signed-off-by: default avatarDarrick J. Wong <darrick.wong@oracle.com>
    428947e9
xfs_buf_item.c 33.1 KB