xfs: fix dqiterate thinko
PATCH 1/1 xfs: fix dqiterate thinko
From: Darrick J. Wong <[email protected]>
For some unknown reason, when I converted the incore dquot objects to store the dquot id in host endian order, I removed the increment here. This causes the scan to stop after retrieving the root dquot, which severely limits the usefulness of the quota scrubber. Fix the lost increment, though it won't fix the problem that the quota iterator code filters out zeroed dquot records.
--- fs/xfs/xfs_dquot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/xfs/xfs_dquot.c +1 -1
@@ -1458,7 +1458,7 @@ xfs_qm_dqiterate(return error; error =iter_fn (dq, type, priv); - id = dq->q_id; + id = dq->q_id +1 ;xfs_qm_dqput (dq); }while (error ==0 && id !=0 );
Quoted 20 lines · Darrick J. Wong
From: Darrick J. Wong <[email protected]>
For some unknown reason, when I converted the incore dquot objects to store the dquot id in host endian order, I removed the increment here. This causes the scan to stop after retrieving the root dquot, which severely limits the usefulness of the quota scrubber. Fix the lost increment, though it won't fix the problem that the quota iterator code filters out zeroed dquot records.
Fixes c51df7334167e ("xfs: stop using q_core.d_id in the quota code")Signed-off-by Darrick J. Wong <[email protected]>--- fs/xfs/xfs_dquot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)fs/xfs/xfs_dquot.c +0
-0
fs/xfs/xfs_dquot.c xfs_qm_dqiterate( · line 1463
Quoted 7 lines
fs/xfs/xfs_dquot.c +1
-1@@ -1458,7 +1458,7 @@ xfs_qm_dqiterate(return error; error =iter_fn (dq, type, priv); - id = dq->q_id; + id = dq->q_id +1 ;xfs_qm_dqput (dq); }while (error ==0 && id !=0 );
I see how this happened looking at the commit mentioned, and how it would have easily been missed on review - there was a separate "id++" line after the xfs_qm_dqput() call that was removed that should have been left in place. This change obviously restores the previous behaviour.
Signature · 2 lines
Dave Chinner [email protected]