xfs: handle DIO overwrite EOF update completion correctly
authorDave Chinner <dchinner@redhat.com>
Thu, 16 Apr 2015 11:59:34 +0000 (21:59 +1000)
committerDave Chinner <david@fromorbit.com>
Thu, 16 Apr 2015 11:59:34 +0000 (21:59 +1000)
commit6dfa1b67e3b3a9bf536e2fb9ed99001c219822a5
tree142857ff25d5d43393bdbc9c1ff18bffba4d7257
parentd5cc2e3f968ff60f247fdef15b04fac788ef46d2
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>
fs/xfs/xfs_aops.c
fs/xfs/xfs_trace.h
This page took 0.027944 seconds and 5 git commands to generate.