OSDN Git Service

xfs: update ag iterator to support wait on new inodes
authorBrian Foster <bfoster@redhat.com>
Wed, 26 Apr 2017 15:30:39 +0000 (08:30 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Fri, 28 Apr 2017 15:11:08 +0000 (08:11 -0700)
commitae2c4ac2dd39b23a87ddb14ceddc3f2872c6aef5
treea592c82c0976a79b516884d2f08f7ddbe938c149
parent756baca27fff3ecaeab9dbc7a5ee35a1d7bc0c7f
xfs: update ag iterator to support wait on new inodes

The AG inode iterator currently skips new inodes as such inodes are
inserted into the inode radix tree before they are fully
constructed. Certain contexts require the ability to wait on the
construction of new inodes, however. The fs-wide dquot release from
the quotaoff sequence is an example of this.

Update the AG inode iterator to support the ability to wait on
inodes flagged with XFS_INEW upon request. Create a new
xfs_inode_ag_iterator_flags() interface and support a set of
iteration flags to modify the iteration behavior. When the
XFS_AGITER_INEW_WAIT flag is set, include XFS_INEW flags in the
radix tree inode lookup and wait on them before the callback is
executed.

Signed-off-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
fs/xfs/xfs_icache.c
fs/xfs/xfs_icache.h