Lines Matching refs:ino
75 u64 ino; member
231 u64 ino; member
239 u64 ino; member
251 u64 ino; member
266 u64 ino; member
276 static int is_waiting_for_move(struct send_ctx *sctx, u64 ino);
279 get_waiting_dir_move(struct send_ctx *sctx, u64 ino);
787 u64 ino, u64 *size, u64 *gen, u64 *mode, u64 *uid, in __get_inode_info() argument
794 key.objectid = ino; in __get_inode_info()
823 u64 ino, u64 *size, u64 *gen, in get_inode_info() argument
833 ret = __get_inode_info(root, path, ino, size, gen, mode, uid, gid, in get_inode_info()
1103 u64 ino, struct fs_path *path) in get_inode_path() argument
1115 key.objectid = ino; in get_inode_path()
1127 if (found_key.objectid != ino || in get_inode_path()
1197 static int __iterate_backrefs(u64 ino, u64 offset, u64 root, void *ctx_) in __iterate_backrefs() argument
1213 ino == bctx->cur_objectid && in __iterate_backrefs()
1222 ret = __get_inode_info(found->root, bctx->path, ino, &i_size, NULL, NULL, in __iterate_backrefs()
1242 if (ino >= bctx->cur_objectid) in __iterate_backrefs()
1245 if (ino > bctx->cur_objectid) in __iterate_backrefs()
1254 if (ino < found->ino) { in __iterate_backrefs()
1255 found->ino = ino; in __iterate_backrefs()
1257 } else if (found->ino == ino) { in __iterate_backrefs()
1279 u64 ino, u64 data_offset, in find_extent_clone() argument
1359 cur_clone_root->ino = (u64)-1; in find_extent_clone()
1366 backref_ctx->cur_objectid = ino; in find_extent_clone()
1412 ino, data_offset, disk_byte, found_key.objectid); in find_extent_clone()
1419 data_offset, ino, num_bytes, logical); in find_extent_clone()
1450 u64 ino, in read_symlink() argument
1466 key.objectid = ino; in read_symlink()
1483 ino, root->root_key.objectid); in read_symlink()
1510 u64 ino, u64 gen, in gen_unique_name() argument
1526 ino, gen, idx); in gen_unique_name()
1581 static int get_cur_inode_state(struct send_ctx *sctx, u64 ino, u64 gen) in get_cur_inode_state() argument
1589 ret = get_inode_info(sctx->send_root, ino, NULL, &left_gen, NULL, NULL, in get_cur_inode_state()
1598 ret = get_inode_info(sctx->parent_root, ino, NULL, &right_gen, in get_cur_inode_state()
1609 if (ino < sctx->send_progress) in get_cur_inode_state()
1614 if (ino < sctx->send_progress) in get_cur_inode_state()
1623 if (ino < sctx->send_progress) in get_cur_inode_state()
1632 if (ino < sctx->send_progress) in get_cur_inode_state()
1647 static int is_inode_existent(struct send_ctx *sctx, u64 ino, u64 gen) in is_inode_existent() argument
1651 ret = get_cur_inode_state(sctx, ino, gen); in is_inode_existent()
1710 static int get_first_ref(struct btrfs_root *root, u64 ino, in get_first_ref() argument
1724 key.objectid = ino; in get_first_ref()
1734 if (ret || found_key.objectid != ino || in get_first_ref()
1778 u64 ino, u64 dir, in is_first_ref() argument
1789 ret = get_first_ref(root, ino, &tmp_dir, NULL, tmp_name); in is_first_ref()
1888 u64 ino, u64 ino_gen, in did_overwrite_ref() argument
1919 if (ow_inode == ino && gen == ino_gen) { in did_overwrite_ref()
1931 (ino != sctx->cur_ino && ow_inode == sctx->cur_ino && in did_overwrite_ref()
1946 static int did_overwrite_first_ref(struct send_ctx *sctx, u64 ino, u64 gen) in did_overwrite_first_ref() argument
1960 ret = get_first_ref(sctx->parent_root, ino, &dir, &dir_gen, name); in did_overwrite_first_ref()
1964 ret = did_overwrite_ref(sctx, dir, dir_gen, ino, gen, in did_overwrite_first_ref()
1985 (unsigned long)nce->ino); in name_cache_insert()
1994 ret = radix_tree_insert(&sctx->name_cache, nce->ino, nce_head); in name_cache_insert()
2014 (unsigned long)nce->ino); in name_cache_delete()
2018 nce->ino, sctx->name_cache_size); in name_cache_delete()
2029 radix_tree_delete(&sctx->name_cache, (unsigned long)nce->ino); in name_cache_delete()
2035 u64 ino, u64 gen) in name_cache_search() argument
2040 nce_head = radix_tree_lookup(&sctx->name_cache, (unsigned long)ino); in name_cache_search()
2045 if (cur->ino == ino && cur->gen == gen) in name_cache_search()
2100 u64 ino, u64 gen, in __get_cur_name_and_parent() argument
2114 nce = name_cache_search(sctx, ino, gen); in __get_cur_name_and_parent()
2116 if (ino < sctx->send_progress && nce->need_later_update) { in __get_cur_name_and_parent()
2137 ret = is_inode_existent(sctx, ino, gen); in __get_cur_name_and_parent()
2142 ret = gen_unique_name(sctx, ino, gen, dest); in __get_cur_name_and_parent()
2153 if (ino < sctx->send_progress) in __get_cur_name_and_parent()
2154 ret = get_first_ref(sctx->send_root, ino, in __get_cur_name_and_parent()
2157 ret = get_first_ref(sctx->parent_root, ino, in __get_cur_name_and_parent()
2166 ret = did_overwrite_ref(sctx, *parent_ino, *parent_gen, ino, gen, in __get_cur_name_and_parent()
2172 ret = gen_unique_name(sctx, ino, gen, dest); in __get_cur_name_and_parent()
2188 nce->ino = ino; in __get_cur_name_and_parent()
2196 if (ino < sctx->send_progress) in __get_cur_name_and_parent()
2235 static int get_cur_path(struct send_ctx *sctx, u64 ino, u64 gen, in get_cur_path() argument
2253 while (!stop && ino != BTRFS_FIRST_FREE_OBJECTID) { in get_cur_path()
2258 if (is_waiting_for_rm(sctx, ino)) { in get_cur_path()
2259 ret = gen_unique_name(sctx, ino, gen, name); in get_cur_path()
2266 wdm = get_waiting_dir_move(sctx, ino); in get_cur_path()
2268 ret = gen_unique_name(sctx, ino, gen, name); in get_cur_path()
2271 ret = get_first_ref(sctx->parent_root, ino, in get_cur_path()
2274 ret = __get_cur_name_and_parent(sctx, ino, gen, in get_cur_path()
2288 ino = parent_inode; in get_cur_path()
2390 static int send_truncate(struct send_ctx *sctx, u64 ino, u64 gen, u64 size) in send_truncate() argument
2395 verbose_printk("btrfs: send_truncate %llu size=%llu\n", ino, size); in send_truncate()
2405 ret = get_cur_path(sctx, ino, gen, p); in send_truncate()
2419 static int send_chmod(struct send_ctx *sctx, u64 ino, u64 gen, u64 mode) in send_chmod() argument
2424 verbose_printk("btrfs: send_chmod %llu mode=%llu\n", ino, mode); in send_chmod()
2434 ret = get_cur_path(sctx, ino, gen, p); in send_chmod()
2448 static int send_chown(struct send_ctx *sctx, u64 ino, u64 gen, u64 uid, u64 gid) in send_chown() argument
2453 verbose_printk("btrfs: send_chown %llu uid=%llu, gid=%llu\n", ino, uid, gid); in send_chown()
2463 ret = get_cur_path(sctx, ino, gen, p); in send_chown()
2478 static int send_utimes(struct send_ctx *sctx, u64 ino, u64 gen) in send_utimes() argument
2488 verbose_printk("btrfs: send_utimes %llu\n", ino); in send_utimes()
2500 key.objectid = ino; in send_utimes()
2515 ret = get_cur_path(sctx, ino, gen, p); in send_utimes()
2538 static int send_create_inode(struct send_ctx *sctx, u64 ino) in send_create_inode() argument
2547 verbose_printk("btrfs: send_create_inode %llu\n", ino); in send_create_inode()
2553 if (ino != sctx->cur_ino) { in send_create_inode()
2554 ret = get_inode_info(sctx->send_root, ino, NULL, &gen, &mode, in send_create_inode()
2587 ret = gen_unique_name(sctx, ino, gen, p); in send_create_inode()
2592 TLV_PUT_U64(sctx, BTRFS_SEND_A_INO, ino); in send_create_inode()
2596 ret = read_symlink(sctx->send_root, ino, p); in send_create_inode()
2793 static int orphanize_inode(struct send_ctx *sctx, u64 ino, u64 gen, in orphanize_inode() argument
2803 ret = gen_unique_name(sctx, ino, gen, orphan); in orphanize_inode()
2824 odi->ino = dir_ino; in add_orphan_dir_info()
2830 if (dir_ino < entry->ino) { in add_orphan_dir_info()
2832 } else if (dir_ino > entry->ino) { in add_orphan_dir_info()
2853 if (dir_ino < entry->ino) in get_orphan_dir_info()
2855 else if (dir_ino > entry->ino) in get_orphan_dir_info()
2963 static int is_waiting_for_move(struct send_ctx *sctx, u64 ino) in is_waiting_for_move() argument
2965 struct waiting_dir_move *entry = get_waiting_dir_move(sctx, ino); in is_waiting_for_move()
2970 static int add_waiting_dir_move(struct send_ctx *sctx, u64 ino, bool orphanized) in add_waiting_dir_move() argument
2979 dm->ino = ino; in add_waiting_dir_move()
2986 if (ino < entry->ino) { in add_waiting_dir_move()
2988 } else if (ino > entry->ino) { in add_waiting_dir_move()
3002 get_waiting_dir_move(struct send_ctx *sctx, u64 ino) in get_waiting_dir_move() argument
3009 if (ino < entry->ino) in get_waiting_dir_move()
3011 else if (ino > entry->ino) in get_waiting_dir_move()
3029 u64 ino, in add_pending_dir_move() argument
3047 pm->ino = ino; in add_pending_dir_move()
3078 ret = add_waiting_dir_move(sctx, pm->ino, is_orphan); in add_pending_dir_move()
3134 dm = get_waiting_dir_move(sctx, pm->ino); in apply_dir_move()
3140 ret = gen_unique_name(sctx, pm->ino, in apply_dir_move()
3143 ret = get_first_ref(sctx->parent_root, pm->ino, in apply_dir_move()
3160 ret = get_cur_path(sctx, pm->ino, pm->gen, to_path); in apply_dir_move()
3197 ret = send_utimes(sctx, pm->ino, pm->gen); in apply_dir_move()
3261 parent_ino = pm->ino; in apply_children_dir_moves()
3411 u64 ino = ino2; in is_ancestor() local
3413 while (ino > BTRFS_FIRST_FREE_OBJECTID) { in is_ancestor()
3419 ret = get_first_ref(root, ino, &parent, &parent_gen, fs_path); in is_ancestor()
3421 if (ret == -ENOENT && ino == ino2) in is_ancestor()
3427 ino = parent; in is_ancestor()
3437 u64 ino = parent_ref->dir; in wait_for_parent_move() local
3457 while (ino > BTRFS_FIRST_FREE_OBJECTID) { in wait_for_parent_move()
3458 if (is_waiting_for_move(sctx, ino)) { in wait_for_parent_move()
3471 ino, path_before); in wait_for_parent_move()
3478 ret = get_first_ref(sctx->send_root, ino, &parent_ino_after, in wait_for_parent_move()
3482 ret = get_first_ref(sctx->parent_root, ino, &parent_ino_before, in wait_for_parent_move()
3493 if (ino > sctx->cur_ino && in wait_for_parent_move()
3499 ino = parent_ino_after; in wait_for_parent_move()
3510 ino, in wait_for_parent_move()
4574 clone_root->root->objectid, clone_root->ino, in send_clone()
4594 ret = get_inode_info(sctx->send_root, clone_root->ino, NULL, in send_clone()
4598 ret = get_cur_path(sctx, clone_root->ino, gen, p); in send_clone()
4600 ret = get_inode_path(clone_root->root, clone_root->ino, p); in send_clone()
4762 key.objectid = clone_root->ino; in clone_range()
4770 if (key.objectid == clone_root->ino && in clone_range()
4798 if (key.objectid != clone_root->ino || in clone_range()