public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: "Darrick J. Wong" <djwong@kernel.org>
Cc: linux-xfs@vger.kernel.org
Subject: Re: [PATCH] xfs: fix dqiterate thinko
Date: Wed, 9 Aug 2023 07:57:39 +1000	[thread overview]
Message-ID: <ZNK6U0T/olLZynaQ@dread.disaster.area> (raw)
In-Reply-To: <20230808024030.GP11352@frogsfrogsfrogs>

On Mon, Aug 07, 2023 at 07:40:30PM -0700, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@kernel.org>
> 
> 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 <djwong@kernel.org>
> ---
>  fs/xfs/xfs_dquot.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/xfs/xfs_dquot.c b/fs/xfs/xfs_dquot.c
> index 17c64b7b91d02..9e6dc5972ec68 100644
> --- a/fs/xfs/xfs_dquot.c
> +++ b/fs/xfs/xfs_dquot.c
> @@ -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.

Reviewed-by: Dave Chinner <dchinner@redhat.com>

-- 
Dave Chinner
david@fromorbit.com

      reply	other threads:[~2023-08-08 21:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-08  2:40 [PATCH] xfs: fix dqiterate thinko Darrick J. Wong
2023-08-08 21:57 ` Dave Chinner [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZNK6U0T/olLZynaQ@dread.disaster.area \
    --to=david@fromorbit.com \
    --cc=djwong@kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox