aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/ctree.h
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2008-01-29 15:15:18 -0500
committerChris Mason <chris.mason@oracle.com>2008-09-25 11:04:00 -0400
commit9c58309d6cf22471dacbcb6de54d00cef9ca20d4 (patch)
tree9f3ae79d2db86de12c4ee5152b3b491b1f1a88a4 /fs/btrfs/ctree.h
parent85e21bac165b4ba1f6f90431ad6fc658ffcbaf3a (diff)
Btrfs: Add inode item and backref in one insert, reducing cpu usage
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/ctree.h')
-rw-r--r--fs/btrfs/ctree.h17
1 files changed, 14 insertions, 3 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index 098cf0883150..127c86f795d0 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -1050,9 +1050,20 @@ static inline int btrfs_del_item(struct btrfs_trans_handle *trans,
1050 1050
1051int btrfs_insert_item(struct btrfs_trans_handle *trans, struct btrfs_root 1051int btrfs_insert_item(struct btrfs_trans_handle *trans, struct btrfs_root
1052 *root, struct btrfs_key *key, void *data, u32 data_size); 1052 *root, struct btrfs_key *key, void *data, u32 data_size);
1053int btrfs_insert_empty_item(struct btrfs_trans_handle *trans, struct btrfs_root 1053int btrfs_insert_empty_items(struct btrfs_trans_handle *trans,
1054 *root, struct btrfs_path *path, struct btrfs_key 1054 struct btrfs_root *root,
1055 *cpu_key, u32 data_size); 1055 struct btrfs_path *path,
1056 struct btrfs_key *cpu_key, u32 *data_size, int nr);
1057
1058static inline int btrfs_insert_empty_item(struct btrfs_trans_handle *trans,
1059 struct btrfs_root *root,
1060 struct btrfs_path *path,
1061 struct btrfs_key *key,
1062 u32 data_size)
1063{
1064 return btrfs_insert_empty_items(trans, root, path, key, &data_size, 1);
1065}
1066
1056int btrfs_next_leaf(struct btrfs_root *root, struct btrfs_path *path); 1067int btrfs_next_leaf(struct btrfs_root *root, struct btrfs_path *path);
1057int btrfs_prev_leaf(struct btrfs_root *root, struct btrfs_path *path); 1068int btrfs_prev_leaf(struct btrfs_root *root, struct btrfs_path *path);
1058int btrfs_leaf_free_space(struct btrfs_root *root, struct extent_buffer *leaf); 1069int btrfs_leaf_free_space(struct btrfs_root *root, struct extent_buffer *leaf);