Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 108340
b: refs/heads/master
c: c94312d
h: refs/heads/master
v: v3
  • Loading branch information
Ruben Porras authored and Lachlan McIlroy committed Aug 13, 2008
1 parent 8e5f534 commit ad89c1d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 20 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5695ef46ef02ba1c6658daa46e6879a2d4f52f5f
refs/heads/master: c94312de223644e2f18e7064ae8cafa14e5c6ef6
26 changes: 7 additions & 19 deletions trunk/fs/xfs/xfs_bmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -384,14 +384,14 @@ xfs_bmap_count_tree(
int levelin,
int *count);

STATIC int
STATIC void
xfs_bmap_count_leaves(
xfs_ifork_t *ifp,
xfs_extnum_t idx,
int numrecs,
int *count);

STATIC int
STATIC void
xfs_bmap_disk_count_leaves(
xfs_extnum_t idx,
xfs_bmbt_block_t *block,
Expand Down Expand Up @@ -6367,13 +6367,9 @@ xfs_bmap_count_blocks(
mp = ip->i_mount;
ifp = XFS_IFORK_PTR(ip, whichfork);
if ( XFS_IFORK_FORMAT(ip, whichfork) == XFS_DINODE_FMT_EXTENTS ) {
if (unlikely(xfs_bmap_count_leaves(ifp, 0,
xfs_bmap_count_leaves(ifp, 0,
ifp->if_bytes / (uint)sizeof(xfs_bmbt_rec_t),
count) < 0)) {
XFS_ERROR_REPORT("xfs_bmap_count_blocks(1)",
XFS_ERRLEVEL_LOW, mp);
return XFS_ERROR(EFSCORRUPTED);
}
count);
return 0;
}

Expand Down Expand Up @@ -6454,13 +6450,7 @@ xfs_bmap_count_tree(
for (;;) {
nextbno = be64_to_cpu(block->bb_rightsib);
numrecs = be16_to_cpu(block->bb_numrecs);
if (unlikely(xfs_bmap_disk_count_leaves(0,
block, 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_bmap_disk_count_leaves(0, block, numrecs, count);
xfs_trans_brelse(tp, bp);
if (nextbno == NULLFSBLOCK)
break;
Expand All @@ -6478,7 +6468,7 @@ xfs_bmap_count_tree(
/*
* Count leaf blocks given a range of extent records.
*/
STATIC int
STATIC void
xfs_bmap_count_leaves(
xfs_ifork_t *ifp,
xfs_extnum_t idx,
Expand All @@ -6491,14 +6481,13 @@ xfs_bmap_count_leaves(
xfs_bmbt_rec_host_t *frp = xfs_iext_get_ext(ifp, idx + b);
*count += xfs_bmbt_get_blockcount(frp);
}
return 0;
}

/*
* Count leaf blocks given a range of extent records originally
* in btree format.
*/
STATIC int
STATIC void
xfs_bmap_disk_count_leaves(
xfs_extnum_t idx,
xfs_bmbt_block_t *block,
Expand All @@ -6512,5 +6501,4 @@ xfs_bmap_disk_count_leaves(
frp = XFS_BTREE_REC_ADDR(xfs_bmbt, block, idx + b);
*count += xfs_bmbt_disk_get_blockcount(frp);
}
return 0;
}

0 comments on commit ad89c1d

Please sign in to comment.