aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/quota
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/quota
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/quota')
-rw-r--r--fs/xfs/quota/xfs_qm.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/fs/xfs/quota/xfs_qm.c b/fs/xfs/quota/xfs_qm.c
index fd4abb8a32c5..1fb757ef3f41 100644
--- a/fs/xfs/quota/xfs_qm.c
+++ b/fs/xfs/quota/xfs_qm.c
@@ -1704,9 +1704,9 @@ xfs_qm_get_rtblks(
1704 xfs_qcnt_t *O_rtblks) 1704 xfs_qcnt_t *O_rtblks)
1705{ 1705{
1706 xfs_filblks_t rtblks; /* total rt blks */ 1706 xfs_filblks_t rtblks; /* total rt blks */
1707 xfs_extnum_t idx; /* extent record index */
1707 xfs_ifork_t *ifp; /* inode fork pointer */ 1708 xfs_ifork_t *ifp; /* inode fork pointer */
1708 xfs_extnum_t nextents; /* number of extent entries */ 1709 xfs_extnum_t nextents; /* number of extent entries */
1709 xfs_bmbt_rec_t *base; /* base of extent array */
1710 xfs_bmbt_rec_t *ep; /* pointer to an extent entry */ 1710 xfs_bmbt_rec_t *ep; /* pointer to an extent entry */
1711 int error; 1711 int error;
1712 1712
@@ -1717,10 +1717,11 @@ xfs_qm_get_rtblks(
1717 return error; 1717 return error;
1718 } 1718 }
1719 rtblks = 0; 1719 rtblks = 0;
1720 nextents = ifp->if_bytes / sizeof(xfs_bmbt_rec_t); 1720 nextents = ifp->if_bytes / (uint)sizeof(xfs_bmbt_rec_t);
1721 base = &ifp->if_u1.if_extents[0]; 1721 for (idx = 0; idx < nextents; idx++) {
1722 for (ep = base; ep < &base[nextents]; ep++) 1722 ep = xfs_iext_get_ext(ifp, idx);
1723 rtblks += xfs_bmbt_get_blockcount(ep); 1723 rtblks += xfs_bmbt_get_blockcount(ep);
1724 }
1724 *O_rtblks = (xfs_qcnt_t)rtblks; 1725 *O_rtblks = (xfs_qcnt_t)rtblks;
1725 return 0; 1726 return 0;
1726} 1727}