Lines Matching refs:root_item

738 	struct btrfs_root_item *root_item;  in create_reloc_root()  local
743 root_item = kmalloc(sizeof(*root_item), GFP_NOFS); in create_reloc_root()
744 if (!root_item) in create_reloc_root()
769 btrfs_set_root_last_snapshot(&root->root_item, commit_root_gen); in create_reloc_root()
790 memcpy(root_item, &root->root_item, sizeof(*root_item)); in create_reloc_root()
791 btrfs_set_root_bytenr(root_item, eb->start); in create_reloc_root()
792 btrfs_set_root_level(root_item, btrfs_header_level(eb)); in create_reloc_root()
793 btrfs_set_root_generation(root_item, trans->transid); in create_reloc_root()
796 btrfs_set_root_refs(root_item, 0); in create_reloc_root()
797 memset(&root_item->drop_progress, 0, in create_reloc_root()
799 btrfs_set_root_drop_level(root_item, 0); in create_reloc_root()
806 &root_key, root_item); in create_reloc_root()
810 kfree(root_item); in create_reloc_root()
821 kfree(root_item); in create_reloc_root()
907 struct btrfs_root_item *root_item; in btrfs_update_reloc_root() local
914 root_item = &reloc_root->root_item; in btrfs_update_reloc_root()
925 btrfs_root_refs(root_item) == 0) { in btrfs_update_reloc_root()
937 btrfs_set_root_node(root_item, reloc_root->node); in btrfs_update_reloc_root()
943 &reloc_root->root_key, root_item); in btrfs_update_reloc_root()
1222 last_snapshot = btrfs_root_last_snapshot(&src->root_item); in replace_path()
1433 last_snapshot = btrfs_root_last_snapshot(&root->root_item); in walk_up_reloc_tree()
1471 last_snapshot = btrfs_root_last_snapshot(&root->root_item); in walk_down_reloc_tree()
1609 reloc_root_item = &reloc_root->root_item; in insert_dirty_subvol()
1686 struct btrfs_root_item *root_item; in merge_reloc_root() local
1702 root_item = &reloc_root->root_item; in merge_reloc_root()
1704 if (btrfs_disk_key_objectid(&root_item->drop_progress) == 0) { in merge_reloc_root()
1705 level = btrfs_root_level(root_item); in merge_reloc_root()
1710 btrfs_disk_key_to_cpu(&key, &root_item->drop_progress); in merge_reloc_root()
1712 level = btrfs_root_drop_level(root_item); in merge_reloc_root()
1737 reserve_level = max_t(int, 1, btrfs_root_level(root_item)); in merge_reloc_root()
1801 btrfs_node_key(path->nodes[level], &root_item->drop_progress, in merge_reloc_root()
1803 btrfs_set_root_drop_level(root_item, level); in merge_reloc_root()
1912 btrfs_set_root_refs(&reloc_root->root_item, 1); in prepare_to_merge()
1977 if (btrfs_root_refs(&reloc_root->root_item) > 0) { in merge_reloc_roots()
4118 memset(&root->root_item.drop_progress, 0, in mark_garbage_root()
4119 sizeof(root->root_item.drop_progress)); in mark_garbage_root()
4120 btrfs_set_root_drop_level(&root->root_item, 0); in mark_garbage_root()
4121 btrfs_set_root_refs(&root->root_item, 0); in mark_garbage_root()
4123 &root->root_key, &root->root_item); in mark_garbage_root()
4188 if (btrfs_root_refs(&reloc_root->root_item) > 0) { in btrfs_recover_relocation()
4246 if (btrfs_root_refs(&reloc_root->root_item) == 0) { in btrfs_recover_relocation()
4383 btrfs_root_last_snapshot(&root->root_item)) in btrfs_reloc_cow_block()
4434 BUG_ON(btrfs_root_refs(&root->root_item) == 0); in btrfs_reloc_pre_snapshot()