• Dave Chinner's avatar
    xfs: handle DIO overwrite EOF update completion correctly · 6dfa1b67
    Dave Chinner authored
    Currently a DIO overwrite that extends the EOF (e.g sub-block IO or
    write into allocated blocks beyond EOF) requires a transaction for
    the EOF update. Thi is done in IO completion context, but we aren't
    explicitly handling this situation properly and so it can run in
    interrupt context. Ensure that we defer IO that spans EOF correctly
    to the DIO completion workqueue, and now that we have an ioend in IO
    completion we can use the common ioend completion path to do all the
    work.
    
    Note: we do not preallocate the append transaction as we can have
    multiple mapping and allocation calls per direct IO. hence
    preallocating can still leave us with nested transactions by
    attempting to map and allocate more blocks after we've preallocated
    an append transaction.
    Signed-off-by: default avatarDave Chinner <dchinner@redhat.com>
    Reviewed-by: default avatarBrian Foster <bfoster@redhat.com>
    Signed-off-by: default avatarDave Chinner <david@fromorbit.com>
    6dfa1b67
xfs_trace.h 63.7 KB