diff options
author | Chris Mason <chris.mason@oracle.com> | 2008-01-29 15:15:18 -0500 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2008-09-25 11:04:00 -0400 |
commit | 9c58309d6cf22471dacbcb6de54d00cef9ca20d4 (patch) | |
tree | 9f3ae79d2db86de12c4ee5152b3b491b1f1a88a4 /fs/btrfs/ctree.h | |
parent | 85e21bac165b4ba1f6f90431ad6fc658ffcbaf3a (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.h | 17 |
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 | ||
1051 | int btrfs_insert_item(struct btrfs_trans_handle *trans, struct btrfs_root | 1051 | int 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); |
1053 | int btrfs_insert_empty_item(struct btrfs_trans_handle *trans, struct btrfs_root | 1053 | int 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 | |||
1058 | static 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 | |||
1056 | int btrfs_next_leaf(struct btrfs_root *root, struct btrfs_path *path); | 1067 | int btrfs_next_leaf(struct btrfs_root *root, struct btrfs_path *path); |
1057 | int btrfs_prev_leaf(struct btrfs_root *root, struct btrfs_path *path); | 1068 | int btrfs_prev_leaf(struct btrfs_root *root, struct btrfs_path *path); |
1058 | int btrfs_leaf_free_space(struct btrfs_root *root, struct extent_buffer *leaf); | 1069 | int btrfs_leaf_free_space(struct btrfs_root *root, struct extent_buffer *leaf); |