]> git.baikalelectronics.ru Git - kernel.git/commit
Long btree pointers are still 64 bit on disk
authorDave Chinner <david@fromorbit.com>
Wed, 21 Jan 2009 04:22:17 +0000 (15:22 +1100)
committerFelix Blyakher <felixb@sgi.com>
Thu, 22 Jan 2009 07:23:11 +0000 (01:23 -0600)
commitb33f5b0034fff00d12688c6d4b58aa5a29b57c1c
tree4593c7ac6aba011389161642a61a1266377ed8b5
parent65a96329d507bfc574f1aabf489ecf0abf294432
Long btree pointers are still 64 bit on disk

[XFS] Long btree pointers are still 64 bit on disk

On 32 bit machines with CONFIG_LBD=n, XFS reduces the
in memory size of xfs_fsblock_t to 32 bits so that it
will fit within 32 bit addressing. However, the disk format
for long btree pointers are still 64 bits in size.

The recent btree rewrite failed to take this into account
when initialising new btree blocks, setting sibling pointers
to NULL and checking if they are NULL. Hence checking whether
a 64 bit NULL was the same as a 32 bit NULL was failingi
resulting in NULL sibling pointers failing to be detected
correctly. This showed up as WANT_CORRUPTED_GOTO shutdowns
in xfs_btree_delrec.

Fix this by making all the comparisons and setting of long
pointer btree NULL blocks to the disk format, not the
in memory format. i.e. use NULLDFSBNO.

Reported-by: Alexander Beregalov <a.beregalov@gmail.com>
Reported-by: Jacek Luczak <difrost.kernel@gmail.com>
Reported-by: Danny ter Haar <dth@dth.net>
Tested-by: Jacek Luczak <difrost.kernel@gmail.com>
Reviewed-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Dave Chinner <david@fromorbit.com>
Signed-off-by: Felix Blyakher <felixb@sgi.com>
fs/xfs/xfs_btree.c