summaryrefslogtreecommitdiff
path: root/ctree.h
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2008-01-29 15:11:36 -0500
committerDavid Woodhouse <dwmw2@hera.kernel.org>2008-01-29 15:11:36 -0500
commitcbf87cad0752748e38bf98f1d18614e0be6dc500 (patch)
treed1a92e4a25dfada5ef50f9dec7174db4fceae01d /ctree.h
parentbb7055ec21bc89814d92683cc40a9f66812aeb84 (diff)
During deletes and truncate, remove many items at once from the tree
Diffstat (limited to 'ctree.h')
-rw-r--r--ctree.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/ctree.h b/ctree.h
index 1166f946..a219c23f 100644
--- a/ctree.h
+++ b/ctree.h
@@ -997,8 +997,16 @@ void btrfs_release_path(struct btrfs_root *root, struct btrfs_path *p);
struct btrfs_path *btrfs_alloc_path(void);
void btrfs_free_path(struct btrfs_path *p);
void btrfs_init_path(struct btrfs_path *p);
-int btrfs_del_item(struct btrfs_trans_handle *trans, struct btrfs_root *root,
- struct btrfs_path *path);
+int btrfs_del_items(struct btrfs_trans_handle *trans, struct btrfs_root *root,
+ struct btrfs_path *path, int slot, int nr);
+
+static inline int btrfs_del_item(struct btrfs_trans_handle *trans,
+ struct btrfs_root *root,
+ struct btrfs_path *path)
+{
+ return btrfs_del_items(trans, root, path, path->slots[0], 1);
+}
+
int btrfs_insert_item(struct btrfs_trans_handle *trans, struct btrfs_root
*root, struct btrfs_key *key, void *data, u32 data_size);
int btrfs_insert_empty_item(struct btrfs_trans_handle *trans, struct btrfs_root