aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_bmap_btree.h
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@infradead.org>2008-10-30 01:53:59 -0400
committerLachlan McIlroy <lachlan@sgi.com>2008-10-30 01:53:59 -0400
commit561f7d17390d00444e6cd0b02b7516c91528082e (patch)
tree59359b995320bf79a55c2f23305960b5ffe74d8f /fs/xfs/xfs_bmap_btree.h
parentf2277f06e626d694e61bb356524ff536ced24acf (diff)
[XFS] split up xfs_btree_init_cursor
xfs_btree_init_cursor contains close to little shared code for the different btrees and will get even more non-common code in the future. Split it up into one routine per btree type. Because xfs_btree_dup_cursor needs to call the init routine for a generic btree cursor add a new btree operation vector that contains a dup_cursor method that initializes a new cursor based on an existing one. The btree operations vector is based on an idea and code from Dave Chinner and will grow more entries later during this series. SGI-PV: 985583 SGI-Modid: xfs-linux-melb:xfs-kern:32176a Signed-off-by: Christoph Hellwig <hch@infradead.org> Signed-off-by: Lachlan McIlroy <lachlan@sgi.com> Signed-off-by: Bill O'Donnell <billodo@sgi.com> Signed-off-by: David Chinner <david@fromorbit.com>
Diffstat (limited to 'fs/xfs/xfs_bmap_btree.h')
-rw-r--r--fs/xfs/xfs_bmap_btree.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/xfs/xfs_bmap_btree.h b/fs/xfs/xfs_bmap_btree.h
index cd0d4b4bb816..4f12fff54975 100644
--- a/fs/xfs/xfs_bmap_btree.h
+++ b/fs/xfs/xfs_bmap_btree.h
@@ -24,6 +24,7 @@ struct xfs_btree_cur;
24struct xfs_btree_lblock; 24struct xfs_btree_lblock;
25struct xfs_mount; 25struct xfs_mount;
26struct xfs_inode; 26struct xfs_inode;
27struct xfs_trans;
27 28
28/* 29/*
29 * Bmap root header, on-disk form only. 30 * Bmap root header, on-disk form only.
@@ -300,6 +301,9 @@ extern void xfs_bmbt_to_bmdr(xfs_bmbt_block_t *, int, xfs_bmdr_block_t *, int);
300extern int xfs_bmbt_update(struct xfs_btree_cur *, xfs_fileoff_t, 301extern int xfs_bmbt_update(struct xfs_btree_cur *, xfs_fileoff_t,
301 xfs_fsblock_t, xfs_filblks_t, xfs_exntst_t); 302 xfs_fsblock_t, xfs_filblks_t, xfs_exntst_t);
302 303
304extern struct xfs_btree_cur *xfs_bmbt_init_cursor(struct xfs_mount *,
305 struct xfs_trans *, struct xfs_inode *, int);
306
303#endif /* __KERNEL__ */ 307#endif /* __KERNEL__ */
304 308
305#endif /* __XFS_BMAP_BTREE_H__ */ 309#endif /* __XFS_BMAP_BTREE_H__ */