xfs: don't use ioends for direct write completions
authorChristoph Hellwig <hch@lst.de>
Mon, 8 Feb 2016 03:40:51 +0000 (14:40 +1100)
committerDave Chinner <david@fromorbit.com>
Mon, 8 Feb 2016 03:40:51 +0000 (14:40 +1100)
commit273dda76f757108bc2b29d30a9595b6dd3bdf3a1
tree6b9c601be181ce64a666ca2903ce4f4e7fbac73c
parent187372a3b9faff68ed61c291d0135e6739e0dbdf
xfs: don't use ioends for direct write completions

We only need to communicate two bits of information to the direct I/O
completion handler:

 (1) do we need to convert any unwritten extents in the range
 (2) do we need to check if we need to update the inode size based
     on the range passed to the completion handler

We can use the private data passed to the get_block handler and the
completion handler as a simple bitmask to communicate this information
instead of the current complicated infrastructure reusing the ioends
from the buffer I/O path, and thus avoiding a memory allocation and
a context switch for any non-trivial direct write.  As a nice side
effect we also decouple the direct I/O path implementation from that
of the buffered I/O path.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Brian Foster <bfoster@redhat.com>
fs/xfs/xfs_aops.c
fs/xfs/xfs_trace.h
This page took 0.024344 seconds and 5 git commands to generate.