/linux-6.1.9/fs/btrfs/ |
D | root-tree.c | 63 struct btrfs_path *path, struct btrfs_root_item *root_item, in btrfs_find_root() argument 96 if (root_item) in btrfs_find_root() 97 btrfs_read_root_item(l, slot, root_item); in btrfs_find_root() 280 if (btrfs_root_refs(&root->root_item) == 0) { in btrfs_find_orphan_roots() 283 btrfs_disk_key_to_cpu(&drop_key, &root->root_item.drop_progress); in btrfs_find_orphan_roots() 457 void btrfs_check_and_init_root_item(struct btrfs_root_item *root_item) in btrfs_check_and_init_root_item() argument 459 u64 inode_flags = btrfs_stack_inode_flags(&root_item->inode); in btrfs_check_and_init_root_item() 463 btrfs_set_stack_inode_flags(&root_item->inode, inode_flags); in btrfs_check_and_init_root_item() 464 btrfs_set_root_flags(root_item, 0); in btrfs_check_and_init_root_item() 465 btrfs_set_root_limit(root_item, 0); in btrfs_check_and_init_root_item() [all …]
|
D | transaction.c | 1223 old_root_used = btrfs_root_used(&root->root_item); in update_cowonly_root() 1226 old_root_bytenr = btrfs_root_bytenr(&root->root_item); in update_cowonly_root() 1228 old_root_used == btrfs_root_used(&root->root_item)) in update_cowonly_root() 1231 btrfs_set_root_node(&root->root_item, root->node); in update_cowonly_root() 1234 &root->root_item); in update_cowonly_root() 1238 old_root_used = btrfs_root_used(&root->root_item); in update_cowonly_root() 1437 btrfs_set_root_node(&root->root_item, in commit_fs_roots() 1443 &root->root_item); in commit_fs_roots() 1626 ASSERT(pending->root_item); in create_pending_snapshot() 1627 new_root_item = pending->root_item; in create_pending_snapshot() [all …]
|
D | ioctl.c | 577 struct btrfs_root_item *root_item; in create_subvol() local 594 root_item = kzalloc(sizeof(*root_item), GFP_KERNEL); in create_subvol() 595 if (!root_item) in create_subvol() 653 inode_item = &root_item->inode; in create_subvol() 661 btrfs_set_root_flags(root_item, 0); in create_subvol() 662 btrfs_set_root_limit(root_item, 0); in create_subvol() 665 btrfs_set_root_bytenr(root_item, leaf->start); in create_subvol() 666 btrfs_set_root_generation(root_item, trans->transid); in create_subvol() 667 btrfs_set_root_level(root_item, 0); in create_subvol() 668 btrfs_set_root_refs(root_item, 1); in create_subvol() [all …]
|
D | relocation.c | 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() [all …]
|
D | disk-io.c | 980 memset(&root->root_item, 0, sizeof(root->root_item)); in __setup_root() 1216 btrfs_set_root_flags(&root->root_item, 0); in btrfs_create_tree() 1217 btrfs_set_root_limit(&root->root_item, 0); in btrfs_create_tree() 1218 btrfs_set_root_bytenr(&root->root_item, leaf->start); in btrfs_create_tree() 1219 btrfs_set_root_generation(&root->root_item, trans->transid); in btrfs_create_tree() 1220 btrfs_set_root_level(&root->root_item, 0); in btrfs_create_tree() 1221 btrfs_set_root_refs(&root->root_item, 1); in btrfs_create_tree() 1222 btrfs_set_root_used(&root->root_item, leaf->len); in btrfs_create_tree() 1223 btrfs_set_root_last_snapshot(&root->root_item, 0); in btrfs_create_tree() 1224 btrfs_set_root_dirid(&root->root_item, 0); in btrfs_create_tree() [all …]
|
D | uuid-tree.c | 276 if (memcmp(uuid, subvol_root->root_item.uuid, BTRFS_UUID_SIZE)) in btrfs_check_uuid_tree_entry() 280 if (memcmp(uuid, subvol_root->root_item.received_uuid, in btrfs_check_uuid_tree_entry()
|
D | block-rsv.c | 356 u64 num_bytes = btrfs_root_used(&fs_info->tree_root->root_item); in btrfs_update_global_block_rsv() 373 num_bytes += btrfs_root_used(&root->root_item); in btrfs_update_global_block_rsv()
|
D | transaction.h | 156 struct btrfs_root_item *root_item; member
|
D | backref.c | 1582 entry->gen != btrfs_root_last_snapshot(&root->root_item)) in lookup_backref_shared_cache() 1641 gen = btrfs_root_last_snapshot(&root->root_item); in store_backref_shared_cache() 1751 extent_gen > btrfs_root_last_snapshot(&root->root_item)) in btrfs_is_data_extent_shared() 2933 if (btrfs_root_level(&root->root_item) == cur->level) { in handle_indirect_tree_backref() 2935 ASSERT(btrfs_root_bytenr(&root->root_item) == cur->bytenr); in handle_indirect_tree_backref() 2985 ASSERT(btrfs_root_bytenr(&root->root_item) == in handle_indirect_tree_backref()
|
D | inode.c | 1828 btrfs_root_last_snapshot(&root->root_item)) in can_nocow_file_extent() 3774 if (dead_root && btrfs_root_refs(&dead_root->root_item) == 0) in btrfs_orphan_cleanup() 4602 WARN_ON(btrfs_root_refs(&root->root_item) != 0); in btrfs_prune_dentries() 4686 root_flags = btrfs_root_flags(&dest->root_item); in btrfs_delete_subvolume() 4687 btrfs_set_root_flags(&dest->root_item, in btrfs_delete_subvolume() 4729 memset(&dest->root_item.drop_progress, 0, in btrfs_delete_subvolume() 4730 sizeof(dest->root_item.drop_progress)); in btrfs_delete_subvolume() 4731 btrfs_set_root_drop_level(&dest->root_item, 0); in btrfs_delete_subvolume() 4732 btrfs_set_root_refs(&dest->root_item, 0); in btrfs_delete_subvolume() 4744 ret = btrfs_uuid_tree_remove(trans, dest->root_item.uuid, in btrfs_delete_subvolume() [all …]
|
D | extent-tree.c | 2333 btrfs_root_last_snapshot(&root->root_item))) in check_committed_ref() 5657 struct btrfs_root_item *root_item = &root->root_item; in btrfs_drop_snapshot() local 5709 if (btrfs_disk_key_objectid(&root_item->drop_progress) == 0) { in btrfs_drop_snapshot() 5717 btrfs_disk_key_to_cpu(&key, &root_item->drop_progress); in btrfs_drop_snapshot() 5721 level = btrfs_root_drop_level(root_item); in btrfs_drop_snapshot() 5753 if (level == btrfs_root_drop_level(root_item)) in btrfs_drop_snapshot() 5796 btrfs_cpu_key_to_disk(&root_item->drop_progress, in btrfs_drop_snapshot() 5798 btrfs_set_root_drop_level(root_item, wc->drop_level); in btrfs_drop_snapshot() 5805 root_item); in btrfs_drop_snapshot()
|
D | send.c | 2439 if (!btrfs_is_empty_uuid(sctx->send_root->root_item.received_uuid)) in send_subvol_begin() 2441 sctx->send_root->root_item.received_uuid); in send_subvol_begin() 2444 sctx->send_root->root_item.uuid); in send_subvol_begin() 2447 btrfs_root_ctransid(&sctx->send_root->root_item)); in send_subvol_begin() 2449 if (!btrfs_is_empty_uuid(parent_root->root_item.received_uuid)) in send_subvol_begin() 2451 parent_root->root_item.received_uuid); in send_subvol_begin() 2454 parent_root->root_item.uuid); in send_subvol_begin() 2456 btrfs_root_ctransid(&sctx->parent_root->root_item)); in send_subvol_begin() 5166 if (!btrfs_is_empty_uuid(clone_root->root->root_item.received_uuid)) in send_clone() 5168 clone_root->root->root_item.received_uuid); in send_clone() [all …]
|
D | volumes.c | 4643 struct btrfs_root_item root_item; in btrfs_uuid_scan_kthread() local 4680 if (item_size < sizeof(root_item)) in btrfs_uuid_scan_kthread() 4683 read_extent_buffer(eb, &root_item, in btrfs_uuid_scan_kthread() 4685 (int)sizeof(root_item)); in btrfs_uuid_scan_kthread() 4686 if (btrfs_root_refs(&root_item) == 0) in btrfs_uuid_scan_kthread() 4689 if (!btrfs_is_empty_uuid(root_item.uuid) || in btrfs_uuid_scan_kthread() 4690 !btrfs_is_empty_uuid(root_item.received_uuid)) { in btrfs_uuid_scan_kthread() 4710 if (!btrfs_is_empty_uuid(root_item.uuid)) { in btrfs_uuid_scan_kthread() 4711 ret = btrfs_uuid_tree_add(trans, root_item.uuid, in btrfs_uuid_scan_kthread() 4721 if (!btrfs_is_empty_uuid(root_item.received_uuid)) { in btrfs_uuid_scan_kthread() [all …]
|
D | check-integrity.c | 954 struct btrfs_root_item root_item; in btrfsic_process_metablock() local 964 sf->block_ctx, &root_item, in btrfsic_process_metablock() 967 next_bytenr = btrfs_root_bytenr(&root_item); in btrfsic_process_metablock() 983 &root_item)); in btrfsic_process_metablock()
|
D | ctree.c | 269 btrfs_root_last_snapshot(&root->root_item) || in btrfs_block_can_be_shared() 833 btrfs_set_root_used(&root->root_item, in root_add_used() 834 btrfs_root_used(&root->root_item) + size); in root_add_used() 841 btrfs_set_root_used(&root->root_item, in root_sub_used() 842 btrfs_root_used(&root->root_item) - size); in root_sub_used()
|
D | ctree.h | 1330 struct btrfs_root_item root_item; member 2454 return (root->root_item.flags & cpu_to_le64(BTRFS_ROOT_SUBVOL_RDONLY)) != 0; in btrfs_root_readonly() 2460 return (root->root_item.flags & cpu_to_le64(BTRFS_ROOT_SUBVOL_DEAD)) != 0; in btrfs_root_dead() 3259 struct btrfs_path *path, struct btrfs_root_item *root_item,
|
D | tree-log.c | 2839 struct btrfs_root_item *root_item) in update_log_root() argument 2847 &log->root_key, root_item); in update_log_root() 2850 &log->root_key, root_item); in update_log_root() 3032 btrfs_set_root_node(&log->root_item, log->node); in btrfs_sync_log() 3033 memcpy(&new_root_item, &log->root_item, sizeof(new_root_item)); in btrfs_sync_log() 7031 if (btrfs_root_refs(&root->root_item) == 0) { in btrfs_log_inode_parent()
|