summaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_btree.h
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@infradead.org>2008-10-30 16:58:01 +1100
committerLachlan McIlroy <lachlan@sgi.com>2008-10-30 16:58:01 +1100
commit91cca5df9bc85efdabfa645f51d54259ed09f4bf (patch)
tree29032361e21d1210effb72f4018f2a202d6a9fb0 /fs/xfs/xfs_btree.h
parentd4b3a4b7dd62f2e111d4d0afa9ef3f9b6cd955c0 (diff)
downloadop-kernel-dev-91cca5df9bc85efdabfa645f51d54259ed09f4bf.zip
op-kernel-dev-91cca5df9bc85efdabfa645f51d54259ed09f4bf.tar.gz
[XFS] implement generic xfs_btree_delete/delrec
Make the btree delete 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:32205a 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.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/xfs/xfs_btree.h b/fs/xfs/xfs_btree.h
index ff2552f..06ef792 100644
--- a/fs/xfs/xfs_btree.h
+++ b/fs/xfs/xfs_btree.h
@@ -192,6 +192,8 @@ struct xfs_btree_ops {
/* update btree root pointer */
void (*set_root)(struct xfs_btree_cur *cur,
union xfs_btree_ptr *nptr, int level_change);
+ int (*kill_root)(struct xfs_btree_cur *cur, struct xfs_buf *bp,
+ int level, union xfs_btree_ptr *newroot);
/* block allocation / freeing */
int (*alloc_block)(struct xfs_btree_cur *cur,
@@ -207,6 +209,7 @@ struct xfs_btree_ops {
int ptr, int reason);
/* records in block/level */
+ int (*get_minrecs)(struct xfs_btree_cur *cur, int level);
int (*get_maxrecs)(struct xfs_btree_cur *cur, int level);
/* records on disk. Matter for the root in inode case. */
@@ -251,6 +254,7 @@ struct xfs_btree_ops {
*/
#define LASTREC_UPDATE 0
#define LASTREC_INSREC 1
+#define LASTREC_DELREC 2
/*
@@ -562,6 +566,7 @@ int xfs_btree_new_root(struct xfs_btree_cur *, int *);
int xfs_btree_new_iroot(struct xfs_btree_cur *, int *, int *);
int xfs_btree_kill_iroot(struct xfs_btree_cur *);
int xfs_btree_insert(struct xfs_btree_cur *, int *);
+int xfs_btree_delete(struct xfs_btree_cur *, int *);
/*
* Helpers.
OpenPOWER on IntegriCloud