Home
last modified time | relevance | path

Searched refs:root_item (Results 1 - 25 of 37) sorted by relevance

12

/kernel/linux/linux-6.6/fs/btrfs/
H A Droot-tree.c22 * sizeof(root_item), we know it's an old version of the root structure and
58 * root_item: the root item of the tree we look for
68 struct btrfs_path *path, struct btrfs_root_item *root_item, in btrfs_find_root()
101 if (root_item) in btrfs_find_root()
102 btrfs_read_root_item(l, slot, root_item); in btrfs_find_root()
285 if (btrfs_root_refs(&root->root_item) == 0) { in btrfs_find_orphan_roots()
288 btrfs_disk_key_to_cpu(&drop_key, &root->root_item.drop_progress); in btrfs_find_orphan_roots()
456 * Old btrfs forgets to init root_item->flags and root_item->byte_limit
458 * root_item
67 btrfs_find_root(struct btrfs_root *root, const struct btrfs_key *search_key, struct btrfs_path *path, struct btrfs_root_item *root_item, struct btrfs_key *root_key) btrfs_find_root() argument
461 btrfs_check_and_init_root_item(struct btrfs_root_item *root_item) btrfs_check_and_init_root_item() argument
[all...]
H A Dtransaction.c1253 old_root_used = btrfs_root_used(&root->root_item); in update_cowonly_root()
1256 old_root_bytenr = btrfs_root_bytenr(&root->root_item); in update_cowonly_root()
1258 old_root_used == btrfs_root_used(&root->root_item)) in update_cowonly_root()
1261 btrfs_set_root_node(&root->root_item, root->node); in update_cowonly_root()
1264 &root->root_item); in update_cowonly_root()
1268 old_root_used = btrfs_root_used(&root->root_item); in update_cowonly_root()
1467 btrfs_set_root_node(&root->root_item, in commit_fs_roots()
1473 &root->root_item); in commit_fs_roots()
1657 ASSERT(pending->root_item); in create_pending_snapshot()
1658 new_root_item = pending->root_item; in create_pending_snapshot()
1922 struct btrfs_root_item *root_item; update_super_roots() local
[all...]
H A Drelocation.c748 struct btrfs_root_item *root_item; in create_reloc_root() local
753 root_item = kmalloc(sizeof(*root_item), GFP_NOFS); in create_reloc_root()
754 if (!root_item) in create_reloc_root()
779 btrfs_set_root_last_snapshot(&root->root_item, commit_root_gen); in create_reloc_root()
800 memcpy(root_item, &root->root_item, sizeof(*root_item)); in create_reloc_root()
801 btrfs_set_root_bytenr(root_item, eb->start); in create_reloc_root()
802 btrfs_set_root_level(root_item, btrfs_header_leve in create_reloc_root()
917 struct btrfs_root_item *root_item; btrfs_update_reloc_root() local
1701 struct btrfs_root_item *root_item; merge_reloc_root() local
[all...]
H A Dioctl.c590 struct btrfs_root_item *root_item; in create_subvol() local
607 root_item = kzalloc(sizeof(*root_item), GFP_KERNEL); in create_subvol()
608 if (!root_item) in create_subvol()
668 inode_item = &root_item->inode; in create_subvol()
676 btrfs_set_root_flags(root_item, 0); in create_subvol()
677 btrfs_set_root_limit(root_item, 0); in create_subvol()
680 btrfs_set_root_bytenr(root_item, leaf->start); in create_subvol()
681 btrfs_set_root_generation(root_item, trans->transid); in create_subvol()
682 btrfs_set_root_level(root_item, in create_subvol()
2140 struct btrfs_root_item *root_item; btrfs_ioctl_get_subvol_info() local
3958 struct btrfs_root_item *root_item = &root->root_item; _btrfs_ioctl_set_received_subvol() local
[all...]
H A Droot-tree.h26 struct btrfs_path *path, struct btrfs_root_item *root_item,
H A Ddisk-io.c627 memset(&root->root_item, 0, sizeof(root->root_item)); in __setup_root()
875 btrfs_set_root_flags(&root->root_item, 0); in btrfs_create_tree()
876 btrfs_set_root_limit(&root->root_item, 0); in btrfs_create_tree()
877 btrfs_set_root_bytenr(&root->root_item, leaf->start); in btrfs_create_tree()
878 btrfs_set_root_generation(&root->root_item, trans->transid); in btrfs_create_tree()
879 btrfs_set_root_level(&root->root_item, 0); in btrfs_create_tree()
880 btrfs_set_root_refs(&root->root_item, 1); in btrfs_create_tree()
881 btrfs_set_root_used(&root->root_item, leaf->len); in btrfs_create_tree()
882 btrfs_set_root_last_snapshot(&root->root_item, in btrfs_create_tree()
[all...]
H A Dctree.h202 struct btrfs_root_item root_item; member
340 /* Byte-swap the constant at compile time, root_item::flags is LE */ in btrfs_root_readonly()
341 return (root->root_item.flags & cpu_to_le64(BTRFS_ROOT_SUBVOL_RDONLY)) != 0; in btrfs_root_readonly()
346 /* Byte-swap the constant at compile time, root_item::flags is LE */ in btrfs_root_dead()
347 return (root->root_item.flags & cpu_to_le64(BTRFS_ROOT_SUBVOL_DEAD)) != 0; in btrfs_root_dead()
H A Dblock-rsv.c329 u64 num_bytes = btrfs_root_used(&fs_info->tree_root->root_item); in btrfs_update_global_block_rsv()
346 num_bytes += btrfs_root_used(&root->root_item); in btrfs_update_global_block_rsv()
353 num_bytes += btrfs_root_used(&fs_info->block_group_root->root_item); in btrfs_update_global_block_rsv()
H A Duuid-tree.c279 if (memcmp(uuid, subvol_root->root_item.uuid, BTRFS_UUID_SIZE)) in btrfs_check_uuid_tree_entry()
283 if (memcmp(uuid, subvol_root->root_item.received_uuid, in btrfs_check_uuid_tree_entry()
H A Dtransaction.h159 struct btrfs_root_item *root_item; member
H A Dextent-tree.c2357 btrfs_root_last_snapshot(&root->root_item))) in check_committed_ref()
5639 struct btrfs_root_item *root_item = &root->root_item; in btrfs_drop_snapshot() local
5691 if (btrfs_disk_key_objectid(&root_item->drop_progress) == 0) { in btrfs_drop_snapshot()
5699 btrfs_disk_key_to_cpu(&key, &root_item->drop_progress); in btrfs_drop_snapshot()
5703 level = btrfs_root_drop_level(root_item); in btrfs_drop_snapshot()
5735 if (level == btrfs_root_drop_level(root_item)) in btrfs_drop_snapshot()
5780 btrfs_cpu_key_to_disk(&root_item->drop_progress, in btrfs_drop_snapshot()
5782 btrfs_set_root_drop_level(root_item, wc->drop_level); in btrfs_drop_snapshot()
5789 root_item); in btrfs_drop_snapshot()
[all...]
H A Dinode.c1888 btrfs_root_last_snapshot(&root->root_item)) in can_nocow_file_extent()
3565 if (dead_root && btrfs_root_refs(&dead_root->root_item) == 0) in btrfs_orphan_cleanup()
4401 WARN_ON(btrfs_root_refs(&root->root_item) != 0); in btrfs_prune_dentries()
4489 root_flags = btrfs_root_flags(&dest->root_item); in btrfs_delete_subvolume()
4490 btrfs_set_root_flags(&dest->root_item, in btrfs_delete_subvolume()
4530 memset(&dest->root_item.drop_progress, 0, in btrfs_delete_subvolume()
4531 sizeof(dest->root_item.drop_progress)); in btrfs_delete_subvolume()
4532 btrfs_set_root_drop_level(&dest->root_item, 0); in btrfs_delete_subvolume()
4533 btrfs_set_root_refs(&dest->root_item, 0); in btrfs_delete_subvolume()
4545 ret = btrfs_uuid_tree_remove(trans, dest->root_item in btrfs_delete_subvolume()
[all...]
H A Dbackref.c1287 entry->gen != btrfs_root_last_snapshot(&root->root_item)) in lookup_backref_shared_cache()
1350 gen = btrfs_root_last_snapshot(&root->root_item); in store_backref_shared_cache()
1534 btrfs_root_last_snapshot(&sc->root->root_item)) { in find_parent_nodes()
3229 if (btrfs_root_level(&root->root_item) == cur->level) { in handle_indirect_tree_backref()
3231 ASSERT(btrfs_root_bytenr(&root->root_item) == cur->bytenr); in handle_indirect_tree_backref()
3281 ASSERT(btrfs_root_bytenr(&root->root_item) == in handle_indirect_tree_backref()
/kernel/linux/linux-5.10/fs/btrfs/
H A Droot-tree.c17 * sizeof(root_item), we know it's an old version of the root structure and
55 * root_item: the root item of the tree we look for
65 struct btrfs_path *path, struct btrfs_root_item *root_item, in btrfs_find_root()
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()
441 * Old btrfs forgets to init root_item->flags and root_item->byte_limit
443 * root_item->inode_item->flags, and use it to indicate if those fields
446 void btrfs_check_and_init_root_item(struct btrfs_root_item *root_item) in btrfs_check_and_init_root_item() argument
64 btrfs_find_root(struct btrfs_root *root, const struct btrfs_key *search_key, struct btrfs_path *path, struct btrfs_root_item *root_item, struct btrfs_key *root_key) btrfs_find_root() argument
[all...]
H A Dtransaction.c1195 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()
1798 struct btrfs_root_item *root_item; update_super_roots() local
[all...]
H A Dioctl.c585 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, in create_subvol()
2734 struct btrfs_root_item *root_item; btrfs_ioctl_get_subvol_info() local
4478 struct btrfs_root_item *root_item = &root->root_item; _btrfs_ioctl_set_received_subvol() local
[all...]
H A Drelocation.c734 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_leve in create_reloc_root()
896 struct btrfs_root_item *root_item; btrfs_update_reloc_root() local
1666 struct btrfs_root_item *root_item; merge_reloc_root() local
[all...]
H A Ddisk-io.c1084 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, in btrfs_create_tree()
[all...]
H A Dblock-rsv.c363 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()
H A Duuid-tree.c277 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()
H A Dtransaction.h154 struct btrfs_root_item *root_item; member
H A Dinode.c1596 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 in btrfs_delete_subvolume()
[all...]
H A Dextent-tree.c2341 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()
[all...]
H A Dinode-map.c419 if (btrfs_root_refs(&root->root_item) == 0) in btrfs_save_ino_cache()
H A Dsend.c2406 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 in send_clone()
[all...]

Completed in 67 milliseconds

12