/fs/btrfs/ |
D | root-tree.c | 65 struct btrfs_path *path, struct btrfs_root_item *root_item, in btrfs_find_root() argument 98 if (root_item) in btrfs_find_root() 99 btrfs_read_root_item(l, slot, root_item); in btrfs_find_root() 282 if (btrfs_root_refs(&root->root_item) == 0) { in btrfs_find_orphan_roots() 446 void btrfs_check_and_init_root_item(struct btrfs_root_item *root_item) in btrfs_check_and_init_root_item() argument 448 u64 inode_flags = btrfs_stack_inode_flags(&root_item->inode); in btrfs_check_and_init_root_item() 452 btrfs_set_stack_inode_flags(&root_item->inode, inode_flags); in btrfs_check_and_init_root_item() 453 btrfs_set_root_flags(root_item, 0); in btrfs_check_and_init_root_item() 454 btrfs_set_root_limit(root_item, 0); in btrfs_check_and_init_root_item() 461 struct btrfs_root_item *item = &root->root_item; in btrfs_update_root_times()
|
D | ioctl.c | 585 struct btrfs_root_item *root_item; in create_subvol() local 600 root_item = kzalloc(sizeof(*root_item), GFP_KERNEL); in create_subvol() 601 if (!root_item) in create_subvol() 652 inode_item = &root_item->inode; in create_subvol() 660 btrfs_set_root_flags(root_item, 0); in create_subvol() 661 btrfs_set_root_limit(root_item, 0); in create_subvol() 664 btrfs_set_root_bytenr(root_item, leaf->start); in create_subvol() 665 btrfs_set_root_generation(root_item, trans->transid); in create_subvol() 666 btrfs_set_root_level(root_item, 0); in create_subvol() 667 btrfs_set_root_refs(root_item, 1); in create_subvol() [all …]
|
D | transaction.c | 1195 old_root_used = btrfs_root_used(&root->root_item); in update_cowonly_root() 1198 old_root_bytenr = btrfs_root_bytenr(&root->root_item); in update_cowonly_root() 1200 old_root_used == btrfs_root_used(&root->root_item)) in update_cowonly_root() 1203 btrfs_set_root_node(&root->root_item, root->node); in update_cowonly_root() 1206 &root->root_item); in update_cowonly_root() 1210 old_root_used = btrfs_root_used(&root->root_item); in update_cowonly_root() 1360 btrfs_set_root_node(&root->root_item, in commit_fs_roots() 1366 &root->root_item); in commit_fs_roots() 1538 ASSERT(pending->root_item); in create_pending_snapshot() 1539 new_root_item = pending->root_item; in create_pending_snapshot() [all …]
|
D | relocation.c | 734 struct btrfs_root_item *root_item; in create_reloc_root() local 739 root_item = kmalloc(sizeof(*root_item), GFP_NOFS); in create_reloc_root() 740 if (!root_item) in create_reloc_root() 765 btrfs_set_root_last_snapshot(&root->root_item, commit_root_gen); in create_reloc_root() 786 memcpy(root_item, &root->root_item, sizeof(*root_item)); in create_reloc_root() 787 btrfs_set_root_bytenr(root_item, eb->start); in create_reloc_root() 788 btrfs_set_root_level(root_item, btrfs_header_level(eb)); in create_reloc_root() 789 btrfs_set_root_generation(root_item, trans->transid); in create_reloc_root() 792 btrfs_set_root_refs(root_item, 0); in create_reloc_root() 793 memset(&root_item->drop_progress, 0, in create_reloc_root() [all …]
|
D | disk-io.c | 1084 memset(&root->root_item, 0, sizeof(root->root_item)); in __setup_root() 1167 root->root_item.flags = 0; in btrfs_create_tree() 1168 root->root_item.byte_limit = 0; in btrfs_create_tree() 1169 btrfs_set_root_bytenr(&root->root_item, leaf->start); in btrfs_create_tree() 1170 btrfs_set_root_generation(&root->root_item, trans->transid); in btrfs_create_tree() 1171 btrfs_set_root_level(&root->root_item, 0); in btrfs_create_tree() 1172 btrfs_set_root_refs(&root->root_item, 1); in btrfs_create_tree() 1173 btrfs_set_root_used(&root->root_item, leaf->len); in btrfs_create_tree() 1174 btrfs_set_root_last_snapshot(&root->root_item, 0); in btrfs_create_tree() 1175 btrfs_set_root_dirid(&root->root_item, 0); in btrfs_create_tree() [all …]
|
D | block-rsv.c | 363 num_bytes = btrfs_root_used(&fs_info->extent_root->root_item) + in btrfs_update_global_block_rsv() 364 btrfs_root_used(&fs_info->csum_root->root_item) + in btrfs_update_global_block_rsv() 365 btrfs_root_used(&fs_info->tree_root->root_item); in btrfs_update_global_block_rsv()
|
D | uuid-tree.c | 277 if (memcmp(uuid, subvol_root->root_item.uuid, BTRFS_UUID_SIZE)) in btrfs_check_uuid_tree_entry() 281 if (memcmp(uuid, subvol_root->root_item.received_uuid, in btrfs_check_uuid_tree_entry()
|
D | transaction.h | 154 struct btrfs_root_item *root_item; member
|
D | inode.c | 1596 btrfs_root_last_snapshot(&root->root_item)) in run_delalloc_nocow() 3134 if (dead_root && btrfs_root_refs(&dead_root->root_item) == 0) in btrfs_orphan_cleanup() 3947 WARN_ON(btrfs_root_refs(&root->root_item) != 0); in btrfs_prune_dentries() 4035 root_flags = btrfs_root_flags(&dest->root_item); in btrfs_delete_subvolume() 4036 btrfs_set_root_flags(&dest->root_item, in btrfs_delete_subvolume() 4072 memset(&dest->root_item.drop_progress, 0, in btrfs_delete_subvolume() 4073 sizeof(dest->root_item.drop_progress)); in btrfs_delete_subvolume() 4074 dest->root_item.drop_level = 0; in btrfs_delete_subvolume() 4075 btrfs_set_root_refs(&dest->root_item, 0); in btrfs_delete_subvolume() 4087 ret = btrfs_uuid_tree_remove(trans, dest->root_item.uuid, in btrfs_delete_subvolume() [all …]
|
D | extent-tree.c | 2341 btrfs_root_last_snapshot(&root->root_item))) in check_committed_ref() 5361 struct btrfs_root_item *root_item = &root->root_item; in btrfs_drop_snapshot() local 5410 if (btrfs_disk_key_objectid(&root_item->drop_progress) == 0) { in btrfs_drop_snapshot() 5419 btrfs_disk_key_to_cpu(&key, &root_item->drop_progress); in btrfs_drop_snapshot() 5423 level = root_item->drop_level; in btrfs_drop_snapshot() 5456 if (level == root_item->drop_level) in btrfs_drop_snapshot() 5499 btrfs_cpu_key_to_disk(&root_item->drop_progress, in btrfs_drop_snapshot() 5501 root_item->drop_level = wc->drop_level; in btrfs_drop_snapshot() 5508 root_item); in btrfs_drop_snapshot()
|
D | send.c | 2406 if (!btrfs_is_empty_uuid(sctx->send_root->root_item.received_uuid)) in send_subvol_begin() 2408 sctx->send_root->root_item.received_uuid); in send_subvol_begin() 2411 sctx->send_root->root_item.uuid); in send_subvol_begin() 2414 le64_to_cpu(sctx->send_root->root_item.ctransid)); in send_subvol_begin() 2416 if (!btrfs_is_empty_uuid(parent_root->root_item.received_uuid)) in send_subvol_begin() 2418 parent_root->root_item.received_uuid); in send_subvol_begin() 2421 parent_root->root_item.uuid); in send_subvol_begin() 2423 le64_to_cpu(sctx->parent_root->root_item.ctransid)); in send_subvol_begin() 5125 if (!btrfs_is_empty_uuid(clone_root->root->root_item.received_uuid)) in send_clone() 5127 clone_root->root->root_item.received_uuid); in send_clone() [all …]
|
D | volumes.c | 4487 struct btrfs_root_item root_item; in btrfs_uuid_scan_kthread() local 4524 if (item_size < sizeof(root_item)) in btrfs_uuid_scan_kthread() 4527 read_extent_buffer(eb, &root_item, in btrfs_uuid_scan_kthread() 4529 (int)sizeof(root_item)); in btrfs_uuid_scan_kthread() 4530 if (btrfs_root_refs(&root_item) == 0) in btrfs_uuid_scan_kthread() 4533 if (!btrfs_is_empty_uuid(root_item.uuid) || in btrfs_uuid_scan_kthread() 4534 !btrfs_is_empty_uuid(root_item.received_uuid)) { in btrfs_uuid_scan_kthread() 4554 if (!btrfs_is_empty_uuid(root_item.uuid)) { in btrfs_uuid_scan_kthread() 4555 ret = btrfs_uuid_tree_add(trans, root_item.uuid, in btrfs_uuid_scan_kthread() 4565 if (!btrfs_is_empty_uuid(root_item.received_uuid)) { in btrfs_uuid_scan_kthread() [all …]
|
D | inode-map.c | 419 if (btrfs_root_refs(&root->root_item) == 0) in btrfs_save_ino_cache()
|
D | check-integrity.c | 1008 struct btrfs_root_item root_item; in btrfsic_process_metablock() local 1018 sf->block_ctx, &root_item, in btrfsic_process_metablock() 1021 next_bytenr = btrfs_root_bytenr(&root_item); in btrfsic_process_metablock() 1037 &root_item)); in btrfsic_process_metablock()
|
D | ctree.h | 1059 struct btrfs_root_item root_item; member 2116 return (root->root_item.flags & cpu_to_le64(BTRFS_ROOT_SUBVOL_RDONLY)) != 0; in btrfs_root_readonly() 2121 return (root->root_item.flags & cpu_to_le64(BTRFS_ROOT_SUBVOL_DEAD)) != 0; in btrfs_root_dead() 2851 struct btrfs_path *path, struct btrfs_root_item *root_item,
|
D | tree-log.c | 2955 struct btrfs_root_item *root_item) in update_log_root() argument 2963 &log->root_key, root_item); in update_log_root() 2966 &log->root_key, root_item); in update_log_root() 3141 btrfs_set_root_node(&log->root_item, log->node); in btrfs_sync_log() 3142 memcpy(&new_root_item, &log->root_item, sizeof(new_root_item)); in btrfs_sync_log() 6123 if (btrfs_root_refs(&root->root_item) == 0) { in btrfs_log_inode_parent()
|
D | backref.c | 2770 if (btrfs_root_level(&root->root_item) == cur->level) { 2772 ASSERT(btrfs_root_bytenr(&root->root_item) == cur->bytenr); 2822 ASSERT(btrfs_root_bytenr(&root->root_item) ==
|
D | ctree.c | 841 btrfs_root_last_snapshot(&root->root_item) || in btrfs_block_can_be_shared() 1799 btrfs_set_root_used(&root->root_item, in root_add_used() 1800 btrfs_root_used(&root->root_item) + size); in root_add_used() 1807 btrfs_set_root_used(&root->root_item, in root_sub_used() 1808 btrfs_root_used(&root->root_item) - size); in root_sub_used()
|
D | free-space-cache.c | 3927 u64 root_gen = btrfs_root_generation(&root->root_item); in load_free_ino_cache()
|