diff options
author | Christoph Hellwig <hch@lst.de> | 2008-12-03 06:20:39 -0500 |
---|---|---|
committer | Niv Sardi <xaiki@sgi.com> | 2008-12-03 23:39:24 -0500 |
commit | 25e41b3d521f52771354a718042a753a3e77df0a (patch) | |
tree | 947d169a36fad5355abb9bc512a1a488bc13439c /fs/xfs/xfs_vnodeops.c | |
parent | 583fa586f0e4a8222dd091ce971b85c1364f3d92 (diff) |
move vn_iowait / vn_iowake into xfs_aops.c
The whole machinery to wait on I/O completion is related to the I/O path
and should be there instead of in xfs_vnode.c. Also give the functions
more descriptive names.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <david@fromorbit.com>
Signed-off-by: Niv Sardi <xaiki@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_vnodeops.c')
-rw-r--r-- | fs/xfs/xfs_vnodeops.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/xfs/xfs_vnodeops.c b/fs/xfs/xfs_vnodeops.c index b29a0eb9c0f7..2d57aae0e310 100644 --- a/fs/xfs/xfs_vnodeops.c +++ b/fs/xfs/xfs_vnodeops.c | |||
@@ -338,7 +338,7 @@ xfs_setattr( | |||
338 | } | 338 | } |
339 | 339 | ||
340 | /* wait for all I/O to complete */ | 340 | /* wait for all I/O to complete */ |
341 | vn_iowait(ip); | 341 | xfs_ioend_wait(ip); |
342 | 342 | ||
343 | if (!code) | 343 | if (!code) |
344 | code = xfs_itruncate_data(ip, iattr->ia_size); | 344 | code = xfs_itruncate_data(ip, iattr->ia_size); |
@@ -2758,7 +2758,7 @@ xfs_reclaim( | |||
2758 | return 0; | 2758 | return 0; |
2759 | } | 2759 | } |
2760 | 2760 | ||
2761 | vn_iowait(ip); | 2761 | xfs_ioend_wait(ip); |
2762 | 2762 | ||
2763 | ASSERT(XFS_FORCED_SHUTDOWN(ip->i_mount) || ip->i_delayed_blks == 0); | 2763 | ASSERT(XFS_FORCED_SHUTDOWN(ip->i_mount) || ip->i_delayed_blks == 0); |
2764 | 2764 | ||
@@ -3149,7 +3149,8 @@ xfs_free_file_space( | |||
3149 | need_iolock = 0; | 3149 | need_iolock = 0; |
3150 | if (need_iolock) { | 3150 | if (need_iolock) { |
3151 | xfs_ilock(ip, XFS_IOLOCK_EXCL); | 3151 | xfs_ilock(ip, XFS_IOLOCK_EXCL); |
3152 | vn_iowait(ip); /* wait for the completion of any pending DIOs */ | 3152 | /* wait for the completion of any pending DIOs */ |
3153 | xfs_ioend_wait(ip); | ||
3153 | } | 3154 | } |
3154 | 3155 | ||
3155 | rounding = max_t(uint, 1 << mp->m_sb.sb_blocklog, PAGE_CACHE_SIZE); | 3156 | rounding = max_t(uint, 1 << mp->m_sb.sb_blocklog, PAGE_CACHE_SIZE); |