diff options
author | Dave Chinner <dchinner@redhat.com> | 2015-04-16 07:59:34 -0400 |
---|---|---|
committer | Dave Chinner <david@fromorbit.com> | 2015-04-16 07:59:34 -0400 |
commit | 6dfa1b67e3b3a9bf536e2fb9ed99001c219822a5 (patch) | |
tree | 142857ff25d5d43393bdbc9c1ff18bffba4d7257 /fs/xfs/xfs_trace.h | |
parent | d5cc2e3f968ff60f247fdef15b04fac788ef46d2 (diff) |
xfs: handle DIO overwrite EOF update completion correctly
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: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
Diffstat (limited to 'fs/xfs/xfs_trace.h')
-rw-r--r-- | fs/xfs/xfs_trace.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/xfs/xfs_trace.h b/fs/xfs/xfs_trace.h index 2de8556ffac2..0ae50e9847bb 100644 --- a/fs/xfs/xfs_trace.h +++ b/fs/xfs/xfs_trace.h | |||
@@ -1220,6 +1220,7 @@ DEFINE_IOMAP_EVENT(xfs_get_blocks_alloc); | |||
1220 | DEFINE_IOMAP_EVENT(xfs_gbmap_direct); | 1220 | DEFINE_IOMAP_EVENT(xfs_gbmap_direct); |
1221 | DEFINE_IOMAP_EVENT(xfs_gbmap_direct_new); | 1221 | DEFINE_IOMAP_EVENT(xfs_gbmap_direct_new); |
1222 | DEFINE_IOMAP_EVENT(xfs_gbmap_direct_update); | 1222 | DEFINE_IOMAP_EVENT(xfs_gbmap_direct_update); |
1223 | DEFINE_IOMAP_EVENT(xfs_gbmap_direct_endio); | ||
1223 | 1224 | ||
1224 | DECLARE_EVENT_CLASS(xfs_simple_io_class, | 1225 | DECLARE_EVENT_CLASS(xfs_simple_io_class, |
1225 | TP_PROTO(struct xfs_inode *ip, xfs_off_t offset, ssize_t count), | 1226 | TP_PROTO(struct xfs_inode *ip, xfs_off_t offset, ssize_t count), |