From 0cc75eddd093d32c39830b95ddbba5d79d7ca69b Mon Sep 17 00:00:00 2001 From: Qu Wenruo Date: Wed, 3 Dec 2014 12:18:30 +0800 Subject: btrfs-progs: Add btrfs_unlink() and btrfs_add_link() functions. Add btrfs_unlink() and btrfs_add_link() functions in inode.c, for the incoming btrfs_mkdir() and later inode operations functions. Signed-off-by: Qu Wenruo Signed-off-by: David Sterba --- ctree.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'ctree.h') diff --git a/ctree.h b/ctree.h index b8c3062..001af63 100644 --- a/ctree.h +++ b/ctree.h @@ -2441,4 +2441,17 @@ static inline int is_fstree(u64 rootid) return 1; return 0; } + +/* inode.c */ +int check_dir_conflict(struct btrfs_root *root, char *name, int namelen, + u64 dir, u64 index); +int btrfs_add_link(struct btrfs_trans_handle *trans, struct btrfs_root *root, + u64 ino, u64 parent_ino, char *name, int namelen, + u8 type, u64 *index, int add_backref); +int btrfs_unlink(struct btrfs_trans_handle *trans, struct btrfs_root *root, + u64 ino, u64 parent_ino, u64 index, const char *name, + int namelen, int add_orphan); +int btrfs_add_orphan_item(struct btrfs_trans_handle *trans, + struct btrfs_root *root, struct btrfs_path *path, + u64 ino); #endif -- cgit v1.2.1