Lines Matching refs:ipath
2267 struct inode_fs_paths *ipath = ctx;
2270 int i = ipath->fspath->elem_cnt;
2274 bytes_left = ipath->fspath->bytes_left > s_ptr ?
2275 ipath->fspath->bytes_left - s_ptr : 0;
2277 fspath_min = (char *)ipath->fspath->val + (i + 1) * s_ptr;
2278 fspath = btrfs_ref_to_path(ipath->fs_root, ipath->btrfs_path, name_len,
2284 ipath->fspath->val[i] = (u64)(unsigned long)fspath;
2285 ++ipath->fspath->elem_cnt;
2286 ipath->fspath->bytes_left = fspath - fspath_min;
2288 ++ipath->fspath->elem_missed;
2289 ipath->fspath->bytes_missing += fspath_min - fspath;
2290 ipath->fspath->bytes_left = 0;
2297 * this dumps all file system paths to the inode into the ipath struct, provided
2299 * from ipath->fspath->val[i].
2300 * when it returns, there are ipath->fspath->elem_cnt number of paths available
2301 * in ipath->fspath->val[]. when the allocated space wasn't sufficient, the
2302 * number of missed paths is recorded in ipath->fspath->elem_missed, otherwise,
2303 * it's zero. ipath->fspath->bytes_missing holds the number of bytes that would
2306 int paths_from_inode(u64 inum, struct inode_fs_paths *ipath)
2308 return iterate_irefs(inum, ipath->fs_root, ipath->btrfs_path,
2309 inode_to_path, ipath);
2365 void free_ipath(struct inode_fs_paths *ipath)
2367 if (!ipath)
2369 kvfree(ipath->fspath);
2370 kfree(ipath);