Linux XFS filesystem development
 help / color / mirror / Atom feed
From: Carlos Maiolino <cem@kernel.org>
To: "Darrick J. Wong" <djwong@kernel.org>
Cc: linux-xfs@vger.kernel.org
Subject: Re: [PATCH] xfs_repair: fix incorrect dabtree hashval comparison
Date: Fri, 17 Mar 2023 11:27:14 +0100	[thread overview]
Message-ID: <20230317102714.obafwoyt45eogt7o@andromeda> (raw)
In-Reply-To: <20230315010155.GE11376@frogsfrogsfrogs>

On Tue, Mar 14, 2023 at 06:01:55PM -0700, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@kernel.org>
> 
> If an xattr structure contains enough names with the same hash value to
> fill multiple xattr leaf blocks with names all hashing to the same
> value, then the dabtree nodes will contain consecutive entries with the
> same hash value.
> 
> This causes false corruption reports in xfs_repair because it's not
> expecting such a huge same-hashing structure.  Fix that.
> 
> Signed-off-by: Darrick J. Wong <djwong@kernel.org>

Looks good. Will test.

Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>

> ---
>  repair/da_util.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/repair/da_util.c b/repair/da_util.c
> index 7239c2e2c64..b229422c81e 100644
> --- a/repair/da_util.c
> +++ b/repair/da_util.c
> @@ -330,7 +330,7 @@ _("%s block used/count inconsistency - %d/%hu\n"),
>  	/*
>  	 * hash values monotonically increasing ???
>  	 */
> -	if (cursor->level[this_level].hashval >=
> +	if (cursor->level[this_level].hashval >
>  				be32_to_cpu(nodehdr.btree[entry].hashval)) {
>  		do_warn(
>  _("%s block hashvalue inconsistency, expected > %u / saw %u\n"),

-- 
Carlos Maiolino

      reply	other threads:[~2023-03-17 10:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <rLhelIA3PWFSu6pHHRNOAfQqN0ICDO3VHNd96FY5L8TPMWp_Xsd1EKrEIfXV-IcapJ6cjVFwKcqYsknuJHcFng==@protonmail.internalid>
2023-03-15  1:01 ` [PATCH] xfs_repair: fix incorrect dabtree hashval comparison Darrick J. Wong
2023-03-17 10:27   ` Carlos Maiolino [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=20230317102714.obafwoyt45eogt7o@andromeda \
    --to=cem@kernel.org \
    --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