aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/linux-2.6/xfs_lrw.c
diff options
context:
space:
mode:
authorNathan Scott <nathans@sgi.com>2006-03-17 01:26:41 -0500
committerNathan Scott <nathans@sgi.com>2006-03-17 01:26:41 -0500
commit9cea236492ebabb9545564eb039aa0f477a05c96 (patch)
tree9d2b0a5f82bb356ae1d74c6c0d71ead95186df10 /fs/xfs/linux-2.6/xfs_lrw.c
parentce9d37c257ceba5b4d089c544e4673546f647565 (diff)
[XFS] Flush and invalidate dirty pages at the start of a direct read also,
else we can hit a delalloc-extents-via-direct-io BUG. SGI-PV: 949916 SGI-Modid: xfs-linux-melb:xfs-kern:25483a Signed-off-by: Nathan Scott <nathans@sgi.com>
Diffstat (limited to 'fs/xfs/linux-2.6/xfs_lrw.c')
-rw-r--r--fs/xfs/linux-2.6/xfs_lrw.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/xfs/linux-2.6/xfs_lrw.c b/fs/xfs/linux-2.6/xfs_lrw.c
index ba07b83f988d..2a936bd38ce7 100644
--- a/fs/xfs/linux-2.6/xfs_lrw.c
+++ b/fs/xfs/linux-2.6/xfs_lrw.c
@@ -270,6 +270,10 @@ xfs_read(
270 } 270 }
271 } 271 }
272 272
273 if (unlikely((ioflags & IO_ISDIRECT) && VN_CACHED(vp)))
274 VOP_FLUSHINVAL_PAGES(vp, ctooff(offtoct(*offset)),
275 -1, FI_REMAPF_LOCKED);
276
273 xfs_rw_enter_trace(XFS_READ_ENTER, &ip->i_iocore, 277 xfs_rw_enter_trace(XFS_READ_ENTER, &ip->i_iocore,
274 (void *)iovp, segs, *offset, ioflags); 278 (void *)iovp, segs, *offset, ioflags);
275 ret = __generic_file_aio_read(iocb, iovp, segs, offset); 279 ret = __generic_file_aio_read(iocb, iovp, segs, offset);