: cleanup xfs_finish_reclaim_all
RFC PATCH 1/3 : cleanup xfs_finish_reclaim_all
xfs_finish_reclaim currently has a rather odd style using a while loop and two local variables to implement a restart the list walking loop operation. Convert this to use a plain goto restart style as used all over the kernel. Also add a sync_mode argument instead of always using XFS_IFLUSH_DELWRI_ELSE_ASYNC - a new caller added in patch three will pass in a different argument.
Signed-off-by Christoph Hellwig <[email protected]>
fs/xfs/xfs_inode.h +1 -1
@@ -461,7 +461,7 @@ void xfs_iunlock_map_shared(xfs_inode_tvoid xfs_ifunlock (xfs_inode_t *);void xfs_ireclaim (xfs_inode_t *);int xfs_finish_reclaim (xfs_inode_t *,int ,int ); -int xfs_finish_reclaim_all (struct xfs_mount *,int ); +int xfs_finish_reclaim_all (struct xfs_mount *,int ,int );/* * xfs_inode.c prototypes.
fs/xfs/xfs_vfsops.c +3 -2
@@ -628,7 +628,7 @@ xfs_quiesce_fs(xfs_refcache_purge_mp (mp);xfs_flush_buftarg (mp->m_ddev_targp,0 ); -xfs_finish_reclaim_all (mp,0 ); +xfs_finish_reclaim_all (mp,0 ,XFS_IFLUSH_DELWRI_ELSE_ASYNC );/* This loop must run at least twice. * The first instance of the loop will flush
@@ -1435,7 +1435,8 @@ xfs_syncsub(if (flags & (SYNC_ATTR |SYNC_DELWRI )) {if (flags &SYNC_BDFLUSH ) -xfs_finish_reclaim_all (mp,1 ); +xfs_finish_reclaim_all (mp,1 , +XFS_IFLUSH_DELWRI_ELSE_ASYNC );else error =xfs_sync_inodes (mp, flags, bypassed); }
fs/xfs/xfs_vnodeops.c +17 -24
53 lines not on this page · raw message