diff options
author | Christoph Hellwig <hch@infradead.org> | 2009-11-24 19:00:21 -0500 |
---|---|---|
committer | Alex Elder <aelder@sgi.com> | 2009-12-15 00:08:15 -0500 |
commit | 6ef3554422e2c7e7aa424ba63737da498881dff4 (patch) | |
tree | ec0c8be29f8caea05f06f98c16e2a25c4fea3ebc /fs/xfs/xfs_inode.c | |
parent | 7574aa92f9b4952c458024e1fa51f20fed65ba07 (diff) |
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>
Diffstat (limited to 'fs/xfs/xfs_inode.c')
-rw-r--r-- | fs/xfs/xfs_inode.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c index b92a4fa2a0a1..614acd508b35 100644 --- a/fs/xfs/xfs_inode.c +++ b/fs/xfs/xfs_inode.c | |||
@@ -3300,11 +3300,13 @@ xfs_iext_get_ext( | |||
3300 | */ | 3300 | */ |
3301 | void | 3301 | void |
3302 | xfs_iext_insert( | 3302 | xfs_iext_insert( |
3303 | xfs_ifork_t *ifp, /* inode fork pointer */ | 3303 | xfs_inode_t *ip, /* incore inode pointer */ |
3304 | xfs_extnum_t idx, /* starting index of new items */ | 3304 | xfs_extnum_t idx, /* starting index of new items */ |
3305 | xfs_extnum_t count, /* number of inserted items */ | 3305 | xfs_extnum_t count, /* number of inserted items */ |
3306 | xfs_bmbt_irec_t *new) /* items to insert */ | 3306 | xfs_bmbt_irec_t *new, /* items to insert */ |
3307 | int state) /* type of extent conversion */ | ||
3307 | { | 3308 | { |
3309 | xfs_ifork_t *ifp = (state & BMAP_ATTRFORK) ? ip->i_afp : &ip->i_df; | ||
3308 | xfs_extnum_t i; /* extent record index */ | 3310 | xfs_extnum_t i; /* extent record index */ |
3309 | 3311 | ||
3310 | ASSERT(ifp->if_flags & XFS_IFEXTENTS); | 3312 | ASSERT(ifp->if_flags & XFS_IFEXTENTS); |
@@ -3549,10 +3551,12 @@ xfs_iext_add_indirect_multi( | |||
3549 | */ | 3551 | */ |
3550 | void | 3552 | void |
3551 | xfs_iext_remove( | 3553 | xfs_iext_remove( |
3552 | xfs_ifork_t *ifp, /* inode fork pointer */ | 3554 | xfs_inode_t *ip, /* incore inode pointer */ |
3553 | xfs_extnum_t idx, /* index to begin removing exts */ | 3555 | xfs_extnum_t idx, /* index to begin removing exts */ |
3554 | int ext_diff) /* number of extents to remove */ | 3556 | int ext_diff, /* number of extents to remove */ |
3557 | int state) /* type of extent conversion */ | ||
3555 | { | 3558 | { |
3559 | xfs_ifork_t *ifp = (state & BMAP_ATTRFORK) ? ip->i_afp : &ip->i_df; | ||
3556 | xfs_extnum_t nextents; /* number of extents in file */ | 3560 | xfs_extnum_t nextents; /* number of extents in file */ |
3557 | int new_size; /* size of extents after removal */ | 3561 | int new_size; /* size of extents after removal */ |
3558 | 3562 | ||