Lines Matching refs:ipath
2579 struct extent_buffer *eb, struct inode_fs_paths *ipath);
2581 static int iterate_inode_refs(u64 inum, struct inode_fs_paths *ipath)
2590 struct btrfs_root *fs_root = ipath->fs_root;
2591 struct btrfs_path *path = ipath->btrfs_path;
2628 (unsigned long)(iref + 1), eb, ipath);
2642 static int iterate_inode_extrefs(u64 inum, struct inode_fs_paths *ipath)
2649 struct btrfs_root *fs_root = ipath->fs_root;
2650 struct btrfs_path *path = ipath->btrfs_path;
2687 (unsigned long)&extref->name, eb, ipath);
2709 struct extent_buffer *eb, struct inode_fs_paths *ipath)
2713 int i = ipath->fspath->elem_cnt;
2717 bytes_left = ipath->fspath->bytes_left > s_ptr ?
2718 ipath->fspath->bytes_left - s_ptr : 0;
2720 fspath_min = (char *)ipath->fspath->val + (i + 1) * s_ptr;
2721 fspath = btrfs_ref_to_path(ipath->fs_root, ipath->btrfs_path, name_len,
2727 ipath->fspath->val[i] = (u64)(unsigned long)fspath;
2728 ++ipath->fspath->elem_cnt;
2729 ipath->fspath->bytes_left = fspath - fspath_min;
2731 ++ipath->fspath->elem_missed;
2732 ipath->fspath->bytes_missing += fspath_min - fspath;
2733 ipath->fspath->bytes_left = 0;
2740 * this dumps all file system paths to the inode into the ipath struct, provided
2742 * from ipath->fspath->val[i].
2743 * when it returns, there are ipath->fspath->elem_cnt number of paths available
2744 * in ipath->fspath->val[]. when the allocated space wasn't sufficient, the
2745 * number of missed paths is recorded in ipath->fspath->elem_missed, otherwise,
2746 * it's zero. ipath->fspath->bytes_missing holds the number of bytes that would
2749 int paths_from_inode(u64 inum, struct inode_fs_paths *ipath)
2754 ret = iterate_inode_refs(inum, ipath);
2760 ret = iterate_inode_extrefs(inum, ipath);
2820 void free_ipath(struct inode_fs_paths *ipath)
2822 if (!ipath)
2824 kvfree(ipath->fspath);
2825 kfree(ipath);