]> www.infradead.org Git - users/jedix/linux-maple.git/commit
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)
committerChuck Anderson <chuck.anderson@oracle.com>
Sun, 28 May 2017 02:44:16 +0000 (19:44 -0700)
commit9228f3d41b1b3a5a8f63b02711cb658c9a4370f2
tree6504cbddb1c2d2e27e35789b7811986f4d646482
parenta27867b807d3771846e1cf6ae3052a95756b9753
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>
(cherry-picked commit from 273dda76f757108bc2b29d30a9595b6dd3bdf3a1)

Orabug: 24393811
Conflicts:
     Fixed a merge conflict in xfs_trace.h arised due to absence of
xfs_zero_eof in UEK4.

Signed-off-by: Ashok Vairavan <ashok.vairavan@oracle.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
fs/xfs/xfs_aops.c
fs/xfs/xfs_trace.h