Re: [GIT PULL] XFS update for 2.6.29

From: Christoph Hellwig
Date: Thu Jan 01 2009 - 12:03:53 EST


On Thu, Jan 01, 2009 at 10:50:52AM +0100, Geert Uytterhoeven wrote:
> | fs/xfs/xfs_btree.c: In function 'xfs_btree_readahead_lblock':
> | fs/xfs/xfs_btree.c:736: warning: comparison is always true due to limited range of data type
> | fs/xfs/xfs_btree.c:741: warning: comparison is always true due to limited range of data type
>
> left/right = xfs_fsblock_t (32 or 64 bit), NULLDFSBNO = xfs_dfsbno_t (64 bit)

Hmm, can't reproduce it here with CONFIG_LBD=n on x86, but the following
patch should fix it:

Index: linux-2.6/fs/xfs/xfs_btree.c
===================================================================
--- linux-2.6.orig/fs/xfs/xfs_btree.c 2009-01-01 15:57:04.606547140 +0100
+++ linux-2.6/fs/xfs/xfs_btree.c 2009-01-01 15:57:24.780673454 +0100
@@ -730,8 +730,8 @@ xfs_btree_readahead_lblock(
struct xfs_btree_block *block)
{
int rval = 0;
- xfs_fsblock_t left = be64_to_cpu(block->bb_u.l.bb_leftsib);
- xfs_fsblock_t right = be64_to_cpu(block->bb_u.l.bb_rightsib);
+ xfs_dfsbno_t left = be64_to_cpu(block->bb_u.l.bb_leftsib);
+ xfs_dfsbno_t right = be64_to_cpu(block->bb_u.l.bb_rightsib);

if ((lr & XFS_BTCUR_LEFTRA) && left != NULLDFSBNO) {
xfs_btree_reada_bufl(cur->bc_mp, left, 1);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/