提交 9a537de3 编写于 作者: D Darrick J. Wong

xfs: xfs_inode_free_quota_blocks should scan project quota

Buffered writers who have run out of quota reservation call
xfs_inode_free_quota_blocks to try to free any space reservations that
might reduce the quota usage.  Unfortunately, the buffered write path
treats "out of project quota" the same as "out of overall space" so this
function has never supported scanning for space that might ease an "out
of project quota" condition.

We're about to start using this function for cases where we actually
/can/ tell if we're out of project quota, so add in this functionality.
Signed-off-by: NDarrick J. Wong <djwong@kernel.org>
Reviewed-by: NChristoph Hellwig <hch@lst.de>
Reviewed-by: NBrian Foster <bfoster@redhat.com>
上级 f41a0716
...@@ -1434,6 +1434,15 @@ xfs_inode_free_quota_blocks( ...@@ -1434,6 +1434,15 @@ xfs_inode_free_quota_blocks(
} }
} }
if (XFS_IS_PQUOTA_ENFORCED(ip->i_mount)) {
dq = xfs_inode_dquot(ip, XFS_DQTYPE_PROJ);
if (dq && xfs_dquot_lowsp(dq)) {
eofb.eof_prid = ip->i_d.di_projid;
eofb.eof_flags |= XFS_EOF_FLAGS_PRID;
do_work = true;
}
}
if (!do_work) if (!do_work)
return false; return false;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册