aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/gcc-plugins/gcc-generate-simple_ipa-pass.h
diff options
context:
space:
mode:
authorEryu Guan <[email protected]>2017-09-21 18:26:18 +0000
committerDarrick J. Wong <[email protected]>2017-09-26 17:55:19 +0000
commitee70daaba82d70766d0723b743d9fdeb3b06102a (patch)
tree4ebdc08030551694139a99df64765a723fd08d5b /scripts/gcc-plugins/gcc-generate-simple_ipa-pass.h
parentiomap_dio_rw: Allocate AIO completion queue before submitting dio (diff)
downloadkernel-ee70daaba82d70766d0723b743d9fdeb3b06102a.tar.gz
kernel-ee70daaba82d70766d0723b743d9fdeb3b06102a.zip
xfs: update i_size after unwritten conversion in dio completion
Since commit d531d91d6990 ("xfs: always use unwritten extents for direct I/O writes"), we start allocating unwritten extents for all direct writes to allow appending aio in XFS. But for dio writes that could extend file size we update the in-core inode size first, then convert the unwritten extents to real allocations at dio completion time in xfs_dio_write_end_io(). Thus a racing direct read could see the new i_size and find the unwritten extents first and read zeros instead of actual data, if the direct writer also takes a shared iolock. Fix it by updating the in-core inode size after the unwritten extent conversion. To do this, introduce a new boolean argument to xfs_iomap_write_unwritten() to tell if we want to update in-core i_size or not. Suggested-by: Brian Foster <[email protected]> Reviewed-by: Brian Foster <[email protected]> Signed-off-by: Eryu Guan <[email protected]> Reviewed-by: Darrick J. Wong <[email protected]> Signed-off-by: Darrick J. Wong <[email protected]>
Diffstat (limited to 'scripts/gcc-plugins/gcc-generate-simple_ipa-pass.h')
0 files changed, 0 insertions, 0 deletions