xfs
[Top] [All Lists]

Re: [PATCH] xfs: fix bad hash ordering

To: Mark Tinguely <tinguely@xxxxxxx>
Subject: Re: [PATCH] xfs: fix bad hash ordering
From: Ben Myers <bpm@xxxxxxx>
Date: Fri, 28 Mar 2014 14:07:58 -0500
Cc: XFS Mailing List <xfs@xxxxxxxxxxx>, Linux Stable <stable@xxxxxxxxxxxxxxx>
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <20140328173430.622616177@xxxxxxx>
References: <20140328173430.622616177@xxxxxxx>
User-agent: Mutt/1.5.20 (2009-06-14)
On Fri, Mar 28, 2014 at 12:33:34PM -0500, Mark Tinguely wrote:
> Fix the fix directory "bad hash ordering" bug introduced in
> commit f5ea1100.
> 
> Reported-by: Hannes Frederic Sowa <hannes@xxxxxxxxxxxxxxxxxxx>
> Signed-off-by: Mark Tinguely <tinguely@xxxxxxx>
> ---
> A C program that generates this problem can be found at:
>  http://oss.sgi.com/archives/xfs/2014-03/msg00373.html
> 
> A xfstest for this bug is coming from Hannes Frederic Sowa.
> 
>  fs/xfs/xfs_da_btree.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> Index: b/fs/xfs/xfs_da_btree.c
> ===================================================================
> --- a/fs/xfs/xfs_da_btree.c
> +++ b/fs/xfs/xfs_da_btree.c
> @@ -1295,7 +1295,7 @@ xfs_da3_fixhashpath(
>               node = blk->bp->b_addr;
>               dp->d_ops->node_hdr_from_disk(&nodehdr, node);
>               btree = dp->d_ops->node_tree_p(node);
> -             if (be32_to_cpu(btree->hashval) == lasthash)
> +             if (be32_to_cpu(btree[blk->index].hashval) == lasthash)
>                       break;
>               blk->hashval = lasthash;
>               btree[blk->index].hashval = cpu_to_be32(lasthash);

Looks good to me.

Reviewed-by: Ben Myers <bpm@xxxxxxx>

<Prev in Thread] Current Thread [Next in Thread>