if (unlikely(xfs_bmap_count_leaves(frp, numrecs, count) < 0)) { 
if (unlikely(xfs_bmap_disk_count_leaves(frp, numrecs, count) < 0)) { 
xfs_bmap_count_tree(	xfs_mount_t     *mp,            /* file system mount point */	xfs_trans_t     *tp,            /* transaction pointer */	xfs_fsblock_t   blockno,	/* file system block number */	int             levelin,	/* level in btree */	int		*count)		/* Count of blocks */{	int			error;	xfs_buf_t		*bp, *nbp;	int			level = levelin;	xfs_bmbt_ptr_t          *pp;	xfs_fsblock_t           bno = blockno;	xfs_fsblock_t		nextbno;	xfs_bmbt_block_t        *block, *nextblock;	int			numrecs;	xfs_bmbt_rec_t		*frp;	if ((error = xfs_btree_read_bufl(mp, tp, bno, 0, &bp, XFS_BMAP_BTREE_REF)))		return error;	*count += 1;	block = XFS_BUF_TO_BMBT_BLOCK(bp);	if (--level) {		/* Not at node above leafs, count this level of nodes */		nextbno = INT_GET(block->bb_rightsib, ARCH_CONVERT);		while (nextbno != NULLFSBLOCK) {			if ((error = xfs_btree_read_bufl(mp, tp, nextbno,				0, &nbp, XFS_BMAP_BTREE_REF)))				return error;			*count += 1;			nextblock = XFS_BUF_TO_BMBT_BLOCK(nbp);			nextbno = INT_GET(nextblock->bb_rightsib, ARCH_CONVERT);			xfs_trans_brelse(tp, nbp);		}		/* Dive to the next level */		pp = XFS_BTREE_PTR_ADDR(mp->m_sb.sb_blocksize,			xfs_bmbt, block, 1, mp->m_bmap_dmxr[1]);		bno = INT_GET(*pp, ARCH_CONVERT);		if (unlikely((error =		     xfs_bmap_count_tree(mp, tp, bno, level, count)) < 0)) {			xfs_trans_brelse(tp, bp);			XFS_ERROR_REPORT("xfs_bmap_count_tree(1)",					 XFS_ERRLEVEL_LOW, mp);			return XFS_ERROR(EFSCORRUPTED);		}		xfs_trans_brelse(tp, bp);	} else {		/* count all level 1 nodes and their leaves */		for (;;) {			nextbno = INT_GET(block->bb_rightsib, ARCH_CONVERT);			numrecs = INT_GET(block->bb_numrecs, ARCH_CONVERT);			frp = XFS_BTREE_REC_ADDR(mp->m_sb.sb_blocksize,				xfs_bmbt, block, 1, mp->m_bmap_dmxr[0]);			if (unlikely(xfs_bmap_count_leaves(frp, numrecs, count) < 0)) {				xfs_trans_brelse(tp, bp);				XFS_ERROR_REPORT("xfs_bmap_count_tree(2)",						 XFS_ERRLEVEL_LOW, mp);				return XFS_ERROR(EFSCORRUPTED);			}			xfs_trans_brelse(tp, bp);			if (nextbno == NULLFSBLOCK)				break;			bno = nextbno;			if ((error = xfs_btree_read_bufl(mp, tp, bno, 0, &bp,				XFS_BMAP_BTREE_REF)))				return error;			*count += 1;			block = XFS_BUF_TO_BMBT_BLOCK(bp);		}	}	return 0;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/91e11088f88e07f5f42c88608329bc0756c183f9/xfs_bmap.c/clean/fs/xfs/xfs_bmap.c