All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xfs: fix bad hash ordering
@ 2014-03-28 17:33 Mark Tinguely
  2014-03-28 19:07 ` Ben Myers
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Mark Tinguely @ 2014-03-28 17:33 UTC (permalink / raw)
  To: XFS Mailing List; +Cc: Linux Stable

[-- Attachment #1: xfs-fix-directory-bad-hash-order.patch --]
[-- Type: text/plain, Size: 1087 bytes --]

Fix the fix directory "bad hash ordering" bug introduced in
commit f5ea1100.

Reported-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: Mark Tinguely <tinguely@sgi.com>
---
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);


_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2014-04-08  8:56 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-28 17:33 [PATCH] xfs: fix bad hash ordering Mark Tinguely
2014-03-28 19:07 ` Ben Myers
2014-03-31  0:10 ` Dave Chinner
2014-03-31  0:35   ` Eric Sandeen
2014-03-31 16:42   ` Mark Tinguely
2014-03-31 21:40     ` Dave Chinner
2014-04-01  2:22       ` Mark Tinguely
2014-04-01 22:03         ` Dave Chinner
2014-04-07 19:00 ` [PATCH] xfsprogs: fix directory hash ordering bug Mark Tinguely
2014-04-08  8:56   ` Dave Chinner

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.