xfs: change the xfs_iext_insert / xfs_iext_remove
Change the xfs_iext_insert / xfs_iext_remove prototypes to pass more information which will allow pushing the trace points from the callers into those functions. This includes folding the whichfork information into the state variable to minimize the addition stack footprint. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Alex Elder <aelder@sgi.com>
This commit is contained in:
committed by
Alex Elder
parent
7574aa92f9
commit
6ef3554422
@@ -3300,11 +3300,13 @@ xfs_iext_get_ext(
|
||||
*/
|
||||
void
|
||||
xfs_iext_insert(
|
||||
xfs_ifork_t *ifp, /* inode fork pointer */
|
||||
xfs_inode_t *ip, /* incore inode pointer */
|
||||
xfs_extnum_t idx, /* starting index of new items */
|
||||
xfs_extnum_t count, /* number of inserted items */
|
||||
xfs_bmbt_irec_t *new) /* items to insert */
|
||||
xfs_bmbt_irec_t *new, /* items to insert */
|
||||
int state) /* type of extent conversion */
|
||||
{
|
||||
xfs_ifork_t *ifp = (state & BMAP_ATTRFORK) ? ip->i_afp : &ip->i_df;
|
||||
xfs_extnum_t i; /* extent record index */
|
||||
|
||||
ASSERT(ifp->if_flags & XFS_IFEXTENTS);
|
||||
@@ -3549,10 +3551,12 @@ xfs_iext_add_indirect_multi(
|
||||
*/
|
||||
void
|
||||
xfs_iext_remove(
|
||||
xfs_ifork_t *ifp, /* inode fork pointer */
|
||||
xfs_inode_t *ip, /* incore inode pointer */
|
||||
xfs_extnum_t idx, /* index to begin removing exts */
|
||||
int ext_diff) /* number of extents to remove */
|
||||
int ext_diff, /* number of extents to remove */
|
||||
int state) /* type of extent conversion */
|
||||
{
|
||||
xfs_ifork_t *ifp = (state & BMAP_ATTRFORK) ? ip->i_afp : &ip->i_df;
|
||||
xfs_extnum_t nextents; /* number of extents in file */
|
||||
int new_size; /* size of extents after removal */
|
||||
|
||||
|
Reference in New Issue
Block a user