diff options
author | Christoph Hellwig <hch@infradead.org> | 2008-10-30 01:57:03 -0400 |
---|---|---|
committer | Lachlan McIlroy <lachlan@sgi.com> | 2008-10-30 01:57:03 -0400 |
commit | f5eb8e7ca58bc1e92436614444006120d21668ba (patch) | |
tree | 94825b885653224f74c6087956cb4e1930380467 /fs/xfs/xfs_btree.h | |
parent | 687b890a184fef263ebb773926e1f4aa69240d01 (diff) |
[XFS] implement generic xfs_btree_split
Make the btree split code generic. Based on a patch from David Chinner
with lots of changes to follow the original btree implementations more
closely. While this loses some of the generic helper routines for
inserting/moving/removing records it also solves some of the one off bugs
in the original code and makes it easier to verify.
SGI-PV: 985583
SGI-Modid: xfs-linux-melb:xfs-kern:32198a
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_btree.h')
-rw-r--r-- | fs/xfs/xfs_btree.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/fs/xfs/xfs_btree.h b/fs/xfs/xfs_btree.h index 7cde287b5c9c..354a6656fad5 100644 --- a/fs/xfs/xfs_btree.h +++ b/fs/xfs/xfs_btree.h | |||
@@ -187,6 +187,12 @@ struct xfs_btree_ops { | |||
187 | /* cursor operations */ | 187 | /* cursor operations */ |
188 | struct xfs_btree_cur *(*dup_cursor)(struct xfs_btree_cur *); | 188 | struct xfs_btree_cur *(*dup_cursor)(struct xfs_btree_cur *); |
189 | 189 | ||
190 | /* block allocation / freeing */ | ||
191 | int (*alloc_block)(struct xfs_btree_cur *cur, | ||
192 | union xfs_btree_ptr *start_bno, | ||
193 | union xfs_btree_ptr *new_bno, | ||
194 | int length, int *stat); | ||
195 | |||
190 | /* update last record information */ | 196 | /* update last record information */ |
191 | void (*update_lastrec)(struct xfs_btree_cur *cur, | 197 | void (*update_lastrec)(struct xfs_btree_cur *cur, |
192 | struct xfs_btree_block *block, | 198 | struct xfs_btree_block *block, |
@@ -535,6 +541,8 @@ int xfs_btree_updkey(struct xfs_btree_cur *, union xfs_btree_key *, int); | |||
535 | int xfs_btree_update(struct xfs_btree_cur *, union xfs_btree_rec *); | 541 | int xfs_btree_update(struct xfs_btree_cur *, union xfs_btree_rec *); |
536 | int xfs_btree_lshift(struct xfs_btree_cur *, int, int *); | 542 | int xfs_btree_lshift(struct xfs_btree_cur *, int, int *); |
537 | int xfs_btree_rshift(struct xfs_btree_cur *, int, int *); | 543 | int xfs_btree_rshift(struct xfs_btree_cur *, int, int *); |
544 | int xfs_btree_split(struct xfs_btree_cur *, int, union xfs_btree_ptr *, | ||
545 | union xfs_btree_key *, struct xfs_btree_cur **, int *); | ||
538 | 546 | ||
539 | /* | 547 | /* |
540 | * Helpers. | 548 | * Helpers. |