OSDN Git Service

xfs: support ability to wait on new inodes
authorBrian Foster <bfoster@redhat.com>
Wed, 26 Apr 2017 15:30:39 +0000 (08:30 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 7 Jun 2017 10:06:02 +0000 (12:06 +0200)
commit8e25af0dc5adac8ee297256558c3ca1c06f15578
treef50c3df61c0108494484e221881ea0f1c58e50ea
parentcf55c35974e177dd3d9e7084528c47fe0dab2422
xfs: support ability to wait on new inodes

commit 756baca27fff3ecaeab9dbc7a5ee35a1d7bc0c7f upstream.

Inodes that are inserted into the perag tree but still under
construction are flagged with the XFS_INEW bit. Most contexts either
skip such inodes when they are encountered or have the ability to
handle them.

The runtime quotaoff sequence introduces a context that must wait
for construction of such inodes to correctly ensure that all dquots
in the fs are released. In anticipation of this, support the ability
to wait on new inodes. Wake the appropriate bit when XFS_INEW is
cleared.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/xfs/xfs_icache.c
fs/xfs/xfs_inode.h