xfs: remove i_iocount
We now have an i_dio_count filed and surrounding infrastructure to wait for direct I/O completion instead of i_icount, and we have never needed to iocount waits for buffered I/O given that we only set the page uptodate after finishing all required work. Thus remove i_iocount, and replace the actually needed waits with calls to inode_dio_wait. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Alex Elder <aelder@sgi.com>
This commit is contained in:

committed by
Alex Elder

parent
2b3ffd7eb7
commit
4a06fd262d
@@ -149,10 +149,6 @@ xfs_file_fsync(
|
||||
|
||||
xfs_iflags_clear(ip, XFS_ITRUNCATED);
|
||||
|
||||
xfs_ilock(ip, XFS_IOLOCK_SHARED);
|
||||
xfs_ioend_wait(ip);
|
||||
xfs_iunlock(ip, XFS_IOLOCK_SHARED);
|
||||
|
||||
if (mp->m_flags & XFS_MOUNT_BARRIER) {
|
||||
/*
|
||||
* If we have an RT and/or log subvolume we need to make sure
|
||||
@@ -758,7 +754,7 @@ restart:
|
||||
* the dio layer. To avoid the problem with aio, we also need to wait for
|
||||
* outstanding IOs to complete so that unwritten extent conversion is completed
|
||||
* before we try to map the overlapping block. This is currently implemented by
|
||||
* hitting it with a big hammer (i.e. xfs_ioend_wait()).
|
||||
* hitting it with a big hammer (i.e. inode_dio_wait()).
|
||||
*
|
||||
* Returns with locks held indicated by @iolock and errors indicated by
|
||||
* negative return values.
|
||||
@@ -821,7 +817,7 @@ xfs_file_dio_aio_write(
|
||||
* otherwise demote the lock if we had to flush cached pages
|
||||
*/
|
||||
if (unaligned_io)
|
||||
xfs_ioend_wait(ip);
|
||||
inode_dio_wait(inode);
|
||||
else if (*iolock == XFS_IOLOCK_EXCL) {
|
||||
xfs_rw_ilock_demote(ip, XFS_IOLOCK_EXCL);
|
||||
*iolock = XFS_IOLOCK_SHARED;
|
||||
|
Reference in New Issue
Block a user