btrfs: introduce a function btrfs_insert_dir_index_item()
RFC PATCH 1/4 btrfs: introduce a function btrfs_insert_dir_index_item()
restructure btrfs_insert_dir_item() and introduce a function btrfs_insert_dir_index_item() to insert dir index item.
Signed-off-by Miao Xie <[email protected]>
--- fs/btrfs/ctree.h | 6 ++++ fs/btrfs/dir-item.c | 69 +++++++++++++++++++++++++++++++++++++++----------- 2 files changed, 60 insertions(+), 15 deletions(-)
fs/btrfs/ctree.h +6 -0
@@ -2313,6 +2313,12 @@ int btrfs_find_orphan_roots(struct btrfs_root *tree_root);int btrfs_set_root_node (struct btrfs_root_item *item,struct extent_buffer *node);/* dir-item.c */ +int btrfs_insert_dir_index_item (struct btrfs_trans_handle *trans, +struct btrfs_root *root, +struct btrfs_key *key, +struct btrfs_path *path, +struct btrfs_dir_item *dir_item, +int data_len); int btrfs_insert_dir_item(struct btrfs_trans_handle *trans, struct btrfs_root *root, const char *name, int name_len, u64 dir,
fs/btrfs/dir-item.c +54 -15
84 lines not on this page · raw message
Signature · 1 line
1.7.0.1