aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_btree.h
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs/xfs_btree.h')
-rw-r--r--fs/xfs/xfs_btree.h20
1 files changed, 6 insertions, 14 deletions
diff --git a/fs/xfs/xfs_btree.h b/fs/xfs/xfs_btree.h
index 332b9f1da203..d30ee7498606 100644
--- a/fs/xfs/xfs_btree.h
+++ b/fs/xfs/xfs_btree.h
@@ -131,6 +131,11 @@ extern const __uint32_t xfs_magics[];
131 131
132#define XFS_BTREE_MAXLEVELS 8 /* max of all btrees */ 132#define XFS_BTREE_MAXLEVELS 8 /* max of all btrees */
133 133
134struct xfs_btree_ops {
135 /* cursor operations */
136 struct xfs_btree_cur *(*dup_cursor)(struct xfs_btree_cur *);
137};
138
134/* 139/*
135 * Btree cursor structure. 140 * Btree cursor structure.
136 * This collects all information needed by the btree code in one place. 141 * This collects all information needed by the btree code in one place.
@@ -139,6 +144,7 @@ typedef struct xfs_btree_cur
139{ 144{
140 struct xfs_trans *bc_tp; /* transaction we're in, if any */ 145 struct xfs_trans *bc_tp; /* transaction we're in, if any */
141 struct xfs_mount *bc_mp; /* file system mount struct */ 146 struct xfs_mount *bc_mp; /* file system mount struct */
147 const struct xfs_btree_ops *bc_ops;
142 union { 148 union {
143 xfs_alloc_rec_incore_t a; 149 xfs_alloc_rec_incore_t a;
144 xfs_bmbt_irec_t b; 150 xfs_bmbt_irec_t b;
@@ -308,20 +314,6 @@ xfs_btree_get_bufs(
308 uint lock); /* lock flags for get_buf */ 314 uint lock); /* lock flags for get_buf */
309 315
310/* 316/*
311 * Allocate a new btree cursor.
312 * The cursor is either for allocation (A) or bmap (B).
313 */
314xfs_btree_cur_t * /* new btree cursor */
315xfs_btree_init_cursor(
316 struct xfs_mount *mp, /* file system mount point */
317 struct xfs_trans *tp, /* transaction pointer */
318 struct xfs_buf *agbp, /* (A only) buffer for agf structure */
319 xfs_agnumber_t agno, /* (A only) allocation group number */
320 xfs_btnum_t btnum, /* btree identifier */
321 struct xfs_inode *ip, /* (B only) inode owning the btree */
322 int whichfork); /* (B only) data/attr fork */
323
324/*
325 * Check for the cursor referring to the last block at the given level. 317 * Check for the cursor referring to the last block at the given level.
326 */ 318 */
327int /* 1=is last block, 0=not last block */ 319int /* 1=is last block, 0=not last block */