Home
last modified time | relevance | path

Searched refs:root_item (Results 1 – 11 of 11) sorted by relevance

/linux/fs/btrfs/
H A Droot-tree.c68 struct btrfs_path *path, struct btrfs_root_item *root_item, in btrfs_find_root() argument
108 if (root_item) in btrfs_find_root()
109 btrfs_read_root_item(l, slot, root_item); in btrfs_find_root()
283 if (btrfs_root_refs(&root->root_item) == 0) { in btrfs_find_orphan_roots()
286 btrfs_disk_key_to_cpu(&drop_key, &root->root_item.drop_progress); in btrfs_find_orphan_roots()
449 void btrfs_check_and_init_root_item(struct btrfs_root_item *root_item) in btrfs_check_and_init_root_item() argument
451 u64 inode_flags = btrfs_stack_inode_flags(&root_item->inode); in btrfs_check_and_init_root_item()
455 btrfs_set_stack_inode_flags(&root_item->inode, inode_flags); in btrfs_check_and_init_root_item()
456 btrfs_set_root_flags(root_item, 0); in btrfs_check_and_init_root_item()
457 btrfs_set_root_limit(root_item, 0); in btrfs_check_and_init_root_item()
[all …]
H A Dtransaction.c1307 old_root_used = btrfs_root_used(&root->root_item); in update_cowonly_root()
1310 old_root_bytenr = btrfs_root_bytenr(&root->root_item); in update_cowonly_root()
1312 old_root_used == btrfs_root_used(&root->root_item)) in update_cowonly_root()
1315 btrfs_set_root_node(&root->root_item, root->node); in update_cowonly_root()
1318 &root->root_item); in update_cowonly_root()
1322 old_root_used = btrfs_root_used(&root->root_item); in update_cowonly_root()
1529 btrfs_set_root_node(&root->root_item, in commit_fs_roots()
1535 &root->root_item); in commit_fs_roots()
1678 ASSERT(pending->root_item); in create_pending_snapshot()
1679 new_root_item = pending->root_item; in create_pending_snapshot()
[all …]
H A Dioctl.c506 struct btrfs_root_item AUTO_KFREE(root_item); in create_subvol()
524 root_item = kzalloc(sizeof(*root_item), GFP_KERNEL); in create_subvol()
525 if (!root_item) in create_subvol()
583 inode_item = &root_item->inode; in create_subvol()
591 btrfs_set_root_flags(root_item, 0); in create_subvol()
592 btrfs_set_root_limit(root_item, 0); in create_subvol()
595 btrfs_set_root_bytenr(root_item, leaf->start); in create_subvol()
596 btrfs_set_root_generation(root_item, trans->transid); in create_subvol()
597 btrfs_set_root_level(root_item, 0); in create_subvol()
598 btrfs_set_root_refs(root_item, 1); in create_subvol()
[all …]
H A Drelocation.c589 struct btrfs_root_item AUTO_KFREE(root_item); in create_reloc_root()
593 root_item = kmalloc(sizeof(*root_item), GFP_NOFS); in create_reloc_root()
594 if (!root_item) in create_reloc_root()
612 if (unlikely(btrfs_disk_key_objectid(&root->root_item.drop_progress))) { in create_reloc_root()
615 btrfs_disk_key_to_cpu(&cpu_key, &root->root_item.drop_progress); in create_reloc_root()
637 btrfs_set_root_last_snapshot(&root->root_item, commit_root_gen); in create_reloc_root()
657 memcpy(root_item, &root->root_item, sizeof(*root_item)); in create_reloc_root()
658 btrfs_set_root_bytenr(root_item, eb->start); in create_reloc_root()
659 btrfs_set_root_level(root_item, btrfs_header_level(eb)); in create_reloc_root()
660 btrfs_set_root_generation(root_item, trans->transid); in create_reloc_root()
[all …]
H A Dblock-rsv.c327 u64 num_bytes = btrfs_root_used(&fs_info->tree_root->root_item); in btrfs_update_global_block_rsv()
344 num_bytes += btrfs_root_used(&root->root_item); in btrfs_update_global_block_rsv()
351 num_bytes += btrfs_root_used(&fs_info->block_group_root->root_item); in btrfs_update_global_block_rsv()
356 num_bytes += btrfs_root_used(&fs_info->stripe_root->root_item); in btrfs_update_global_block_rsv()
H A Ddisk-io.c828 btrfs_set_root_flags(&root->root_item, 0); in btrfs_create_tree()
829 btrfs_set_root_limit(&root->root_item, 0); in btrfs_create_tree()
830 btrfs_set_root_bytenr(&root->root_item, leaf->start); in btrfs_create_tree()
831 btrfs_set_root_generation(&root->root_item, trans->transid); in btrfs_create_tree()
832 btrfs_set_root_level(&root->root_item, 0); in btrfs_create_tree()
833 btrfs_set_root_refs(&root->root_item, 1); in btrfs_create_tree()
834 btrfs_set_root_used(&root->root_item, leaf->len); in btrfs_create_tree()
835 btrfs_set_root_last_snapshot(&root->root_item, 0); in btrfs_create_tree()
836 btrfs_set_root_dirid(&root->root_item, 0); in btrfs_create_tree()
838 generate_random_guid(root->root_item.uuid); in btrfs_create_tree()
[all …]
H A Droot-tree.h34 struct btrfs_path *path, struct btrfs_root_item *root_item,
H A Dinode.c1940 btrfs_root_last_snapshot(&root->root_item)) in can_nocow_file_extent()
3795 if (dead_root && btrfs_root_refs(&dead_root->root_item) == 0) in btrfs_orphan_cleanup()
4717 WARN_ON(btrfs_root_refs(&root->root_item) != 0); in btrfs_prune_dentries()
4771 root_flags = btrfs_root_flags(&dest->root_item); in btrfs_delete_subvolume()
4772 btrfs_set_root_flags(&dest->root_item, in btrfs_delete_subvolume()
4815 memset(&dest->root_item.drop_progress, 0, in btrfs_delete_subvolume()
4816 sizeof(dest->root_item.drop_progress)); in btrfs_delete_subvolume()
4817 btrfs_set_root_drop_level(&dest->root_item, 0); in btrfs_delete_subvolume()
4818 btrfs_set_root_refs(&dest->root_item, 0); in btrfs_delete_subvolume()
4830 ret = btrfs_uuid_tree_remove(trans, dest->root_item.uuid, in btrfs_delete_subvolume()
[all …]
H A Dbackref.c1277 entry->gen != btrfs_root_last_snapshot(&root->root_item)) in lookup_backref_shared_cache()
1340 gen = btrfs_root_last_snapshot(&root->root_item); in store_backref_shared_cache()
1527 btrfs_root_last_snapshot(&sc->root->root_item)) { in find_parent_nodes()
3277 if (btrfs_root_level(&root->root_item) == cur->level) { in handle_indirect_tree_backref()
3279 ASSERT(btrfs_root_bytenr(&root->root_item) == cur->bytenr); in handle_indirect_tree_backref()
3329 ASSERT(btrfs_root_bytenr(&root->root_item) == in handle_indirect_tree_backref()
H A Dsend.c2507 if (!btrfs_is_empty_uuid(sctx->send_root->root_item.received_uuid)) in send_subvol_begin()
2509 sctx->send_root->root_item.received_uuid); in send_subvol_begin()
2512 sctx->send_root->root_item.uuid); in send_subvol_begin()
2515 btrfs_root_ctransid(&sctx->send_root->root_item)); in send_subvol_begin()
2517 if (!btrfs_is_empty_uuid(parent_root->root_item.received_uuid)) in send_subvol_begin()
2519 parent_root->root_item.received_uuid); in send_subvol_begin()
2522 parent_root->root_item.uuid); in send_subvol_begin()
2524 btrfs_root_ctransid(&sctx->parent_root->root_item)); in send_subvol_begin()
5345 if (!btrfs_is_empty_uuid(clone_root->root->root_item.received_uuid)) in send_clone()
5347 clone_root->root->root_item.received_uuid); in send_clone()
[all …]
H A Dtree-log.c3172 struct btrfs_root_item *root_item) in update_log_root() argument
3180 &log->root_key, root_item); in update_log_root()
3183 &log->root_key, root_item); in update_log_root()
3411 btrfs_set_root_node(&log->root_item, log->node); in btrfs_sync_log()
3412 memcpy(&new_root_item, &log->root_item, sizeof(new_root_item)); in btrfs_sync_log()
7493 if (btrfs_root_refs(&root->root_item) == 0) in btrfs_log_inode_parent()
7500 if (btrfs_root_generation(&root->root_item) == trans->transid) in btrfs_log_inode_parent()