aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_bmap_btree.c
diff options
context:
space:
mode:
authorMandy Kirkconnell <alkirkco@sgi.com>2006-03-13 21:29:52 -0500
committerNathan Scott <nathans@sgi.com>2006-03-13 21:29:52 -0500
commit4eea22f01bb4fdba1aab4430c33adbe88d9d4985 (patch)
tree90e2088cd821e1013088682843e11d600f8c711a /fs/xfs/xfs_bmap_btree.c
parent9f989c9455aac417c34af9c505e6b169055251da (diff)
[XFS] 929045 567344 This mod re-organizes some of the in-core file extent
code to prepare for an upcoming mod which will introduce multi-level in-core extent allocations. Although the in-core extent management is using a new code path in this mod, the functionality remains the same. Major changes include: - Introduce 10 new subroutines which re-orgainze the existing code but do NOT change functionality: xfs_iext_get_ext() xfs_iext_insert() xfs_iext_add() xfs_iext_remove() xfs_iext_remove_inline() xfs_iext_remove_direct() xfs_iext_realloc_direct() xfs_iext_direct_to_inline() xfs_iext_inline_to_direct() xfs_iext_destroy() - Remove 2 subroutines (functionality moved to new subroutines above): xfs_iext_realloc() -replaced by xfs_iext_add() and xfs_iext_remove() xfs_bmap_insert_exlist() - replaced by xfs_iext_insert() xfs_bmap_delete_exlist() - replaced by xfs_iext_remove() - Replace all hard-coded (indexed) extent assignments with a call to xfs_iext_get_ext() - Replace all extent record pointer arithmetic (ep++, ep--, base + lastx,..) with calls to xfs_iext_get_ext() - Update comments to remove the idea of a single "extent list" and introduce "extent record" terminology instead SGI-PV: 928864 SGI-Modid: xfs-linux-melb:xfs-kern:207390a Signed-off-by: Mandy Kirkconnell <alkirkco@sgi.com> Signed-off-by: Nathan Scott <nathans@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_bmap_btree.c')
-rw-r--r--fs/xfs/xfs_bmap_btree.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/fs/xfs/xfs_bmap_btree.c b/fs/xfs/xfs_bmap_btree.c
index 3f1383d160e8..bea44709afbe 100644
--- a/fs/xfs/xfs_bmap_btree.c
+++ b/fs/xfs/xfs_bmap_btree.c
@@ -2754,7 +2754,7 @@ xfs_bmbt_update(
2754} 2754}
2755 2755
2756/* 2756/*
2757 * Check an extent list, which has just been read, for 2757 * Check extent records, which have just been read, for
2758 * any bit in the extent flag field. ASSERT on debug 2758 * any bit in the extent flag field. ASSERT on debug
2759 * kernels, as this condition should not occur. 2759 * kernels, as this condition should not occur.
2760 * Return an error condition (1) if any flags found, 2760 * Return an error condition (1) if any flags found,
@@ -2763,10 +2763,14 @@ xfs_bmbt_update(
2763 2763
2764int 2764int
2765xfs_check_nostate_extents( 2765xfs_check_nostate_extents(
2766 xfs_bmbt_rec_t *ep, 2766 xfs_ifork_t *ifp,
2767 xfs_extnum_t idx,
2767 xfs_extnum_t num) 2768 xfs_extnum_t num)
2768{ 2769{
2769 for (; num > 0; num--, ep++) { 2770 xfs_bmbt_rec_t *ep;
2771
2772 for (; num > 0; num--, idx++) {
2773 ep = xfs_iext_get_ext(ifp, idx);
2770 if ((ep->l0 >> 2774 if ((ep->l0 >>
2771 (64 - BMBT_EXNTFLAG_BITLEN)) != 0) { 2775 (64 - BMBT_EXNTFLAG_BITLEN)) != 0) {
2772 ASSERT(0); 2776 ASSERT(0);