diff options
author | Qu Wenruo <wqu@suse.com> | 2020-06-24 19:03:05 +0300 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2020-09-08 03:57:27 +0300 |
commit | c921aa20c3682456b59574be8cf3df589d909950 (patch) | |
tree | dd08412b23cc1f74712b4d48d39da91f6e4557e2 /fs/btrfs/ctree.h | |
parent | 5bdcb37495d594c352221f582e31a0ec04b7d58b (diff) | |
download | u-boot-c921aa20c3682456b59574be8cf3df589d909950.tar.xz |
fs: btrfs: Implement btrfs_lookup_path()
This is the extent buffer based path lookup routine.
To implement this, btrfs_lookup_dir_item() is crossported from
btrfs-progs, and implements btrfs_lookup_path() from scratch.
Unlike the existing __btrfs_lookup_path(), since btrfs_read_fs_root()
will check whether a root is a orphan at read time, there is no need to
check root backref, this makes the code a little easier to read.
Signed-off-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: Marek BehĂșn <marek.behun@nic.cz>
Diffstat (limited to 'fs/btrfs/ctree.h')
-rw-r--r-- | fs/btrfs/ctree.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index d635b0814e..111a5a6a29 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h @@ -1285,6 +1285,10 @@ struct btrfs_dir_item *btrfs_lookup_dir_item(struct btrfs_trans_handle *trans, struct btrfs_path *path, u64 dir, const char *name, int name_len, int mod); +/* inode.c */ +int btrfs_lookup_path(struct btrfs_root *root, u64 ino, const char *filename, + struct btrfs_root **root_ret, u64 *ino_ret, + u8 *type_ret, int symlink_limit); /* ctree.c */ int btrfs_comp_cpu_keys(const struct btrfs_key *k1, const struct btrfs_key *k2); |