mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 23:32:14 +00:00
[XFS] Remove xfs_iflush_all and clean up xfs_finish_reclaim_all()
xfs_iflush_all() walks the m_inodes list to find inodes that need reclaiming. We already have such a list - the m_del_inodes list. Replace xfs_iflush_all() with a call to xfs_finish_reclaim_all() and clean up xfs_finish_reclaim_all() to handle the different flush modes now needed. Originally based on a patch from Christoph Hellwig. Version 3 o rediff against new linux-2.6/xfs_sync.c code Version 2 o revert xfs_syncsub() inode reclaim behaviour back to original code o xfs_quiesce_fs() should use XFS_IFLUSH_DELWRI_ELSE_ASYNC, not XFS_IFLUSH_ASYNC, to prevent change of behaviour. SGI-PV: 988139 SGI-Modid: xfs-linux-melb:xfs-kern:32284a Signed-off-by: David Chinner <david@fromorbit.com> Signed-off-by: Lachlan McIlroy <lachlan@sgi.com> Signed-off-by: Christoph Hellwig <hch@infradead.org>
This commit is contained in:
parent
a167b17e89
commit
75c68f411b
6 changed files with 22 additions and 64 deletions
|
@ -3499,41 +3499,6 @@ corrupt_out:
|
|||
}
|
||||
|
||||
|
||||
/*
|
||||
* Flush all inactive inodes in mp.
|
||||
*/
|
||||
void
|
||||
xfs_iflush_all(
|
||||
xfs_mount_t *mp)
|
||||
{
|
||||
xfs_inode_t *ip;
|
||||
|
||||
again:
|
||||
XFS_MOUNT_ILOCK(mp);
|
||||
ip = mp->m_inodes;
|
||||
if (ip == NULL)
|
||||
goto out;
|
||||
|
||||
do {
|
||||
/* Make sure we skip markers inserted by sync */
|
||||
if (ip->i_mount == NULL) {
|
||||
ip = ip->i_mnext;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!VFS_I(ip)) {
|
||||
XFS_MOUNT_IUNLOCK(mp);
|
||||
xfs_finish_reclaim(ip, 0, XFS_IFLUSH_ASYNC);
|
||||
goto again;
|
||||
}
|
||||
|
||||
ASSERT(vn_count(VFS_I(ip)) == 0);
|
||||
|
||||
ip = ip->i_mnext;
|
||||
} while (ip != mp->m_inodes);
|
||||
out:
|
||||
XFS_MOUNT_IUNLOCK(mp);
|
||||
}
|
||||
|
||||
#ifdef XFS_ILOCK_TRACE
|
||||
ktrace_t *xfs_ilock_trace_buf;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue