Lines Matching refs:clone_root
73 struct clone_root { struct
96 struct clone_root *clone_roots; argument
1172 struct clone_root *cr = (struct clone_root *)elt; in __clone_root_cmp_bsearch()
1183 struct clone_root *cr1 = (struct clone_root *)e1; in __clone_root_cmp_sort()
1184 struct clone_root *cr2 = (struct clone_root *)e2; in __clone_root_cmp_sort()
1200 struct clone_root *found; in __iterate_backrefs()
1207 sizeof(struct clone_root), in __iterate_backrefs()
1281 struct clone_root **found) in find_extent_clone()
1293 struct clone_root *cur_clone_root; in find_extent_clone()
4566 struct clone_root *clone_root) in send_clone() argument
4574 clone_root->root->objectid, clone_root->ino, in send_clone()
4575 clone_root->offset); in send_clone()
4593 if (clone_root->root == sctx->send_root) { 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()
4614 if (!btrfs_is_empty_uuid(clone_root->root->root_item.received_uuid)) in send_clone()
4616 clone_root->root->root_item.received_uuid); in send_clone()
4619 clone_root->root->root_item.uuid); in send_clone()
4621 le64_to_cpu(clone_root->root->root_item.ctransid)); in send_clone()
4624 clone_root->offset); in send_clone()
4726 struct clone_root *clone_root, in clone_range() argument
4762 key.objectid = clone_root->ino; in clone_range()
4764 key.offset = clone_root->offset; in clone_range()
4765 ret = btrfs_search_slot(NULL, clone_root->root, &key, path, 0, 0); in clone_range()
4770 if (key.objectid == clone_root->ino && in clone_range()
4784 ret = btrfs_next_leaf(clone_root->root, path); in clone_range()
4798 if (key.objectid != clone_root->ino || in clone_range()
4811 if (key.offset + ext_len <= clone_root->offset) in clone_range()
4814 if (key.offset > clone_root->offset) { in clone_range()
4816 u64 hole_len = key.offset - clone_root->offset; in clone_range()
4828 clone_root->offset += hole_len; in clone_range()
4832 if (key.offset >= clone_root->offset + len) in clone_range()
4839 ret = send_clone(sctx, offset, clone_len, clone_root); in clone_range()
4850 clone_root->offset += clone_len; in clone_range()
4868 struct clone_root *clone_root) in send_write_or_clone() argument
4900 if (clone_root && IS_ALIGNED(offset + len, bs)) { in send_write_or_clone()
4906 ret = clone_range(sctx, clone_root, disk_byte, data_offset, in send_write_or_clone()
5184 struct clone_root *found_clone = NULL; in process_extent()
5933 struct btrfs_root *clone_root; in btrfs_ioctl_send() local
6040 sctx->clone_roots = vzalloc(sizeof(struct clone_root) * in btrfs_ioctl_send()
6070 clone_root = btrfs_read_fs_root_no_name(fs_info, &key); in btrfs_ioctl_send()
6071 if (IS_ERR(clone_root)) { in btrfs_ioctl_send()
6073 ret = PTR_ERR(clone_root); in btrfs_ioctl_send()
6076 spin_lock(&clone_root->root_item_lock); in btrfs_ioctl_send()
6077 if (!btrfs_root_readonly(clone_root) || in btrfs_ioctl_send()
6078 btrfs_root_dead(clone_root)) { in btrfs_ioctl_send()
6079 spin_unlock(&clone_root->root_item_lock); in btrfs_ioctl_send()
6084 clone_root->send_in_progress++; in btrfs_ioctl_send()
6085 spin_unlock(&clone_root->root_item_lock); in btrfs_ioctl_send()
6088 sctx->clone_roots[i].root = clone_root; in btrfs_ioctl_send()