Lines Matching refs:clone_root

67 struct clone_root {  struct
90 struct clone_root *clone_roots; argument
1197 struct clone_root *cr = (struct clone_root *)elt; in __clone_root_cmp_bsearch()
1208 struct clone_root *cr1 = (struct clone_root *)e1; in __clone_root_cmp_sort()
1209 struct clone_root *cr2 = (struct clone_root *)e2; in __clone_root_cmp_sort()
1225 struct clone_root *found; in __iterate_backrefs()
1232 sizeof(struct clone_root), in __iterate_backrefs()
1300 struct clone_root **found) in find_extent_clone()
1314 struct clone_root *cur_clone_root; in find_extent_clone()
5044 struct clone_root *clone_root) in send_clone() argument
5052 offset, len, clone_root->root->objectid, clone_root->ino, in send_clone()
5053 clone_root->offset); in send_clone()
5071 if (clone_root->root == sctx->send_root) { in send_clone()
5072 ret = get_inode_info(sctx->send_root, clone_root->ino, NULL, in send_clone()
5076 ret = get_cur_path(sctx, clone_root->ino, gen, p); in send_clone()
5078 ret = get_inode_path(clone_root->root, clone_root->ino, p); in send_clone()
5092 if (!btrfs_is_empty_uuid(clone_root->root->root_item.received_uuid)) in send_clone()
5094 clone_root->root->root_item.received_uuid); in send_clone()
5097 clone_root->root->root_item.uuid); in send_clone()
5099 le64_to_cpu(clone_root->root->root_item.ctransid)); in send_clone()
5102 clone_root->offset); in send_clone()
5281 struct clone_root *clone_root, in clone_range() argument
5306 if (clone_root->offset == 0 && in clone_range()
5336 key.objectid = clone_root->ino; in clone_range()
5338 key.offset = clone_root->offset; in clone_range()
5339 ret = btrfs_search_slot(NULL, clone_root->root, &key, path, 0, 0); in clone_range()
5344 if (key.objectid == clone_root->ino && in clone_range()
5358 ret = btrfs_next_leaf(clone_root->root, path); in clone_range()
5372 if (key.objectid != clone_root->ino || in clone_range()
5385 if (key.offset + ext_len <= clone_root->offset) in clone_range()
5388 if (key.offset > clone_root->offset) { in clone_range()
5390 u64 hole_len = key.offset - clone_root->offset; in clone_range()
5402 clone_root->offset += hole_len; in clone_range()
5406 if (key.offset >= clone_root->offset + len) in clone_range()
5413 ret = send_clone(sctx, offset, clone_len, clone_root); in clone_range()
5424 clone_root->offset += clone_len; in clone_range()
5442 struct clone_root *clone_root) in send_write_or_clone() argument
5477 if (clone_root && IS_ALIGNED(offset + len, bs)) { in send_write_or_clone()
5483 ret = clone_range(sctx, clone_root, disk_byte, data_offset, in send_write_or_clone()
5864 struct clone_root *found_clone = NULL; in process_extent()
6796 struct btrfs_root *clone_root; in btrfs_ioctl_send() local
6832 if (arg->clone_sources_count > SZ_8M / sizeof(struct clone_root)) { in btrfs_ioctl_send()
6897 alloc_size = sizeof(struct clone_root) * (arg->clone_sources_count + 1); in btrfs_ioctl_send()
6928 clone_root = btrfs_read_fs_root_no_name(fs_info, &key); in btrfs_ioctl_send()
6929 if (IS_ERR(clone_root)) { in btrfs_ioctl_send()
6931 ret = PTR_ERR(clone_root); in btrfs_ioctl_send()
6934 spin_lock(&clone_root->root_item_lock); in btrfs_ioctl_send()
6935 if (!btrfs_root_readonly(clone_root) || in btrfs_ioctl_send()
6936 btrfs_root_dead(clone_root)) { in btrfs_ioctl_send()
6937 spin_unlock(&clone_root->root_item_lock); in btrfs_ioctl_send()
6942 clone_root->send_in_progress++; in btrfs_ioctl_send()
6943 spin_unlock(&clone_root->root_item_lock); in btrfs_ioctl_send()
6946 sctx->clone_roots[i].root = clone_root; in btrfs_ioctl_send()