Hi Christoph,
On Mon, Jul 10, 2006 at 07:04:20PM +0200, Christoph Hellwig wrote:
> --- xfs-2.6.x.orig/fs/xfs/xfs_bmap_btree.c 2006-07-09 19:28:16.000000000
> +0200
> +++ xfs-2.6.x/fs/xfs/xfs_bmap_btree.c 2006-07-09 19:37:01.000000000 +0200
> @@ -382,7 +382,7 @@
> pp = XFS_BMAP_PTR_IADDR(block, 1, cur);
> #ifdef DEBUG
> for (i = ptr; i < numrecs; i++) {
> - if ((error = xfs_btree_check_lptr(cur, INT_GET(pp[i],
> ARCH_CONVERT), level))) {
> + if ((error = xfs_btree_check_lptr_disk(cur, pp,
> level))) {
This incorrectly changes the debug-only btree checking here, no?
> --- xfs-2.6.x.orig/fs/xfs/xfs_btree.h 2006-07-09 19:34:52.000000000 +0200
> +++ xfs-2.6.x/fs/xfs/xfs_btree.h 2006-07-09 19:37:01.000000000 +0200
> @@ -243,6 +243,9 @@
> xfs_dfsbno_t ptr, /* btree block disk address */
> int level); /* btree block level */
>
> +#define xfs_btree_check_lptr_disk(cur, ptr, level) \
> + xfs_btree_check_lptr(cur, INT_GET(ptr, ARCH_CONVERT), level)
> +
Shouldn't this be using be64_to_cpu() instead of the old school
INT_GET? Maybe static inline here for type checking? *shrug*.
thanks.
--
Nathan
|