Commit 28b9060b authored by Darrick J. Wong's avatar Darrick J. Wong

xfs: rename on-disk dquot counter zap functions

The function 'xfs_qm_dqiterate' doesn't iterate dquots at all, it
iterates all dquot blocks of a quota inode and clears the counters.
Therefore, change the name to something more descriptive so that we can
introduce a real dquot iterator later.
Signed-off-by: default avatarDarrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: default avatarBrian Foster <bfoster@redhat.com>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
parent 30ab2dcf
...@@ -884,7 +884,7 @@ xfs_qm_reset_dqcounts( ...@@ -884,7 +884,7 @@ xfs_qm_reset_dqcounts(
} }
STATIC int STATIC int
xfs_qm_dqiter_bufs( xfs_qm_reset_dqcounts_all(
struct xfs_mount *mp, struct xfs_mount *mp,
xfs_dqid_t firstid, xfs_dqid_t firstid,
xfs_fsblock_t bno, xfs_fsblock_t bno,
...@@ -952,11 +952,11 @@ xfs_qm_dqiter_bufs( ...@@ -952,11 +952,11 @@ xfs_qm_dqiter_bufs(
} }
/* /*
* Iterate over all allocated USR/GRP/PRJ dquots in the system, calling a * Iterate over all allocated dquot blocks in this quota inode, zeroing all
* caller supplied function for every chunk of dquots that we find. * counters for every chunk of dquots that we find.
*/ */
STATIC int STATIC int
xfs_qm_dqiterate( xfs_qm_reset_dqcounts_buf(
struct xfs_mount *mp, struct xfs_mount *mp,
struct xfs_inode *qip, struct xfs_inode *qip,
uint flags, uint flags,
...@@ -1032,7 +1032,7 @@ xfs_qm_dqiterate( ...@@ -1032,7 +1032,7 @@ xfs_qm_dqiterate(
* Iterate thru all the blks in the extent and * Iterate thru all the blks in the extent and
* reset the counters of all the dquots inside them. * reset the counters of all the dquots inside them.
*/ */
error = xfs_qm_dqiter_bufs(mp, firstid, error = xfs_qm_reset_dqcounts_all(mp, firstid,
map[i].br_startblock, map[i].br_startblock,
map[i].br_blockcount, map[i].br_blockcount,
flags, buffer_list); flags, buffer_list);
...@@ -1293,7 +1293,7 @@ xfs_qm_quotacheck( ...@@ -1293,7 +1293,7 @@ xfs_qm_quotacheck(
* We don't log our changes till later. * We don't log our changes till later.
*/ */
if (uip) { if (uip) {
error = xfs_qm_dqiterate(mp, uip, XFS_QMOPT_UQUOTA, error = xfs_qm_reset_dqcounts_buf(mp, uip, XFS_QMOPT_UQUOTA,
&buffer_list); &buffer_list);
if (error) if (error)
goto error_return; goto error_return;
...@@ -1301,7 +1301,7 @@ xfs_qm_quotacheck( ...@@ -1301,7 +1301,7 @@ xfs_qm_quotacheck(
} }
if (gip) { if (gip) {
error = xfs_qm_dqiterate(mp, gip, XFS_QMOPT_GQUOTA, error = xfs_qm_reset_dqcounts_buf(mp, gip, XFS_QMOPT_GQUOTA,
&buffer_list); &buffer_list);
if (error) if (error)
goto error_return; goto error_return;
...@@ -1309,7 +1309,7 @@ xfs_qm_quotacheck( ...@@ -1309,7 +1309,7 @@ xfs_qm_quotacheck(
} }
if (pip) { if (pip) {
error = xfs_qm_dqiterate(mp, pip, XFS_QMOPT_PQUOTA, error = xfs_qm_reset_dqcounts_buf(mp, pip, XFS_QMOPT_PQUOTA,
&buffer_list); &buffer_list);
if (error) if (error)
goto error_return; goto error_return;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment