Home
last modified time | relevance | path

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

/linux/fs/btrfs/
H A Duuid-tree.c278 if (memcmp(uuid, subvol_root->root_item.uuid, BTRFS_UUID_SIZE)) in btrfs_check_uuid_tree_entry()
282 if (memcmp(uuid, subvol_root->root_item.received_uuid, in btrfs_check_uuid_tree_entry()
403 struct btrfs_root_item root_item; in btrfs_uuid_scan_kthread() local
440 if (item_size < sizeof(root_item)) in btrfs_uuid_scan_kthread()
443 read_extent_buffer(eb, &root_item, in btrfs_uuid_scan_kthread()
445 (int)sizeof(root_item)); in btrfs_uuid_scan_kthread()
446 if (btrfs_root_refs(&root_item) == 0) in btrfs_uuid_scan_kthread()
449 if (!btrfs_is_empty_uuid(root_item.uuid) || in btrfs_uuid_scan_kthread()
450 !btrfs_is_empty_uuid(root_item.received_uuid)) { in btrfs_uuid_scan_kthread()
470 if (!btrfs_is_empty_uuid(root_item in btrfs_uuid_scan_kthread()
[all...]
H A Droot-tree.c21 * 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() argument
108 if (root_item) in btrfs_find_root()
109 btrfs_read_root_item(l, slot, root_item); in btrfs_find_root()
290 if (btrfs_root_refs(&root->root_item) == 0) { in btrfs_find_orphan_roots()
293 btrfs_disk_key_to_cpu(&drop_key, &root->root_item.drop_progress); in btrfs_find_orphan_roots()
463 * Old btrfs forgets to init root_item->flags and root_item->byte_limit
465 * root_item
468 btrfs_check_and_init_root_item(struct btrfs_root_item * root_item) btrfs_check_and_init_root_item() argument
[all...]
H A Dioctl.c506 struct btrfs_root_item *root_item; in create_subvol() local
524 root_item = kzalloc(sizeof(*root_item), GFP_KERNEL); in create_subvol()
525 if (!root_item) in create_subvol()
585 inode_item = &root_item->inode; in create_subvol()
593 btrfs_set_root_flags(root_item, 0); in create_subvol()
594 btrfs_set_root_limit(root_item, 0); in create_subvol()
597 btrfs_set_root_bytenr(root_item, leaf->start); in create_subvol()
598 btrfs_set_root_generation(root_item, trans->transid); in create_subvol()
599 btrfs_set_root_level(root_item, in create_subvol()
2068 struct btrfs_root_item *root_item; btrfs_ioctl_get_subvol_info() local
3964 struct btrfs_root_item *root_item = &root->root_item; _btrfs_ioctl_set_received_subvol() local
[all...]
H A Dtransaction.c1297 old_root_used = btrfs_root_used(&root->root_item); in update_cowonly_root()
1300 old_root_bytenr = btrfs_root_bytenr(&root->root_item); in update_cowonly_root()
1302 old_root_used == btrfs_root_used(&root->root_item)) in update_cowonly_root()
1305 btrfs_set_root_node(&root->root_item, root->node); in update_cowonly_root()
1308 &root->root_item); in update_cowonly_root()
1312 old_root_used = btrfs_root_used(&root->root_item); in update_cowonly_root()
1511 btrfs_set_root_node(&root->root_item, in commit_fs_roots()
1517 &root->root_item); in commit_fs_roots()
1660 ASSERT(pending->root_item); in create_pending_snapshot()
1661 new_root_item = pending->root_item; in create_pending_snapshot()
1936 struct btrfs_root_item *root_item; update_super_roots() local
[all...]
H A Drelocation.c589 struct btrfs_root_item *root_item; in create_reloc_root() local
594 root_item = kmalloc(sizeof(*root_item), GFP_NOFS); in create_reloc_root()
595 if (!root_item) in create_reloc_root()
613 if (unlikely(btrfs_disk_key_objectid(&root->root_item.drop_progress))) { in create_reloc_root()
616 btrfs_disk_key_to_cpu(&cpu_key, &root->root_item.drop_progress); in create_reloc_root()
639 btrfs_set_root_last_snapshot(&root->root_item, commit_root_gen); in create_reloc_root()
660 memcpy(root_item, &root->root_item, sizeof(*root_item)); in create_reloc_root()
776 struct btrfs_root_item *root_item; btrfs_update_reloc_root() local
1526 struct btrfs_root_item *root_item; merge_reloc_root() local
[all...]
H A Dctree.h177 struct btrfs_root_item root_item; member
321 /* Byte-swap the constant at compile time, root_item::flags is LE */ in btrfs_root_readonly()
322 return (root->root_item.flags & cpu_to_le64(BTRFS_ROOT_SUBVOL_RDONLY)) != 0; in btrfs_root_readonly()
327 /* Byte-swap the constant at compile time, root_item::flags is LE */ in btrfs_root_dead()
328 return (root->root_item.flags & cpu_to_le64(BTRFS_ROOT_SUBVOL_DEAD)) != 0; in btrfs_root_dead()
381 return btrfs_root_last_snapshot(&root->root_item); in btrfs_root_origin_generation()
H A Dblock-rsv.c328 u64 num_bytes = btrfs_root_used(&fs_info->tree_root->root_item); in btrfs_update_global_block_rsv()
345 num_bytes += btrfs_root_used(&root->root_item); in btrfs_update_global_block_rsv()
352 num_bytes += btrfs_root_used(&fs_info->block_group_root->root_item); in btrfs_update_global_block_rsv()
357 num_bytes += btrfs_root_used(&fs_info->stripe_root->root_item); in btrfs_update_global_block_rsv()
H A Ddisk-io.c649 memset(&root->root_item, 0, sizeof(root->root_item)); in btrfs_alloc_root()
878 btrfs_set_root_flags(&root->root_item, 0); in btrfs_create_tree()
879 btrfs_set_root_limit(&root->root_item, 0); in btrfs_create_tree()
880 btrfs_set_root_bytenr(&root->root_item, leaf->start); in btrfs_create_tree()
881 btrfs_set_root_generation(&root->root_item, trans->transid); in btrfs_create_tree()
882 btrfs_set_root_level(&root->root_item, 0); in btrfs_create_tree()
883 btrfs_set_root_refs(&root->root_item, 1); in btrfs_create_tree()
884 btrfs_set_root_used(&root->root_item, leaf->len); in btrfs_create_tree()
885 btrfs_set_root_last_snapshot(&root->root_item, in btrfs_create_tree()
[all...]
H A Droot-tree.h34 struct btrfs_path *path, struct btrfs_root_item *root_item,
H A Dtransaction.h183 struct btrfs_root_item *root_item; member
H A Dinode.c1841 btrfs_root_last_snapshot(&root->root_item)) in can_nocow_file_extent()
3650 if (dead_root && btrfs_root_refs(&dead_root->root_item) == 0) in btrfs_orphan_cleanup()
4556 WARN_ON(btrfs_root_refs(&root->root_item) != 0); in btrfs_prune_dentries()
4610 root_flags = btrfs_root_flags(&dest->root_item); in btrfs_delete_subvolume()
4611 btrfs_set_root_flags(&dest->root_item, in btrfs_delete_subvolume()
4654 memset(&dest->root_item.drop_progress, 0, in btrfs_delete_subvolume()
4655 sizeof(dest->root_item.drop_progress)); in btrfs_delete_subvolume()
4656 btrfs_set_root_drop_level(&dest->root_item, 0); in btrfs_delete_subvolume()
4657 btrfs_set_root_refs(&dest->root_item, 0); in btrfs_delete_subvolume()
4669 ret = btrfs_uuid_tree_remove(trans, dest->root_item.uuid, in btrfs_delete_subvolume()
[all …]
H A Dbackref.c1278 entry->gen != btrfs_root_last_snapshot(&root->root_item)) in lookup_backref_shared_cache()
1341 gen = btrfs_root_last_snapshot(&root->root_item); in store_backref_shared_cache()
1528 btrfs_root_last_snapshot(&sc->root->root_item)) { in find_parent_nodes()
3286 if (btrfs_root_level(&root->root_item) == cur->level) { in handle_indirect_tree_backref()
3288 ASSERT(btrfs_root_bytenr(&root->root_item) == cur->bytenr); in handle_indirect_tree_backref()
3338 ASSERT(btrfs_root_bytenr(&root->root_item) == in handle_indirect_tree_backref()
H A Dextent-tree.c6061 struct btrfs_root_item *root_item = &root->root_item; in btrfs_drop_snapshot() local
6113 if (btrfs_disk_key_objectid(&root_item->drop_progress) == 0) { in btrfs_drop_snapshot()
6121 btrfs_disk_key_to_cpu(&key, &root_item->drop_progress); in btrfs_drop_snapshot()
6125 level = btrfs_root_drop_level(root_item); in btrfs_drop_snapshot()
6160 if (level == btrfs_root_drop_level(root_item)) in btrfs_drop_snapshot()
6204 btrfs_cpu_key_to_disk(&root_item->drop_progress, in btrfs_drop_snapshot()
6206 btrfs_set_root_drop_level(root_item, wc->drop_level); in btrfs_drop_snapshot()
6213 root_item); in btrfs_drop_snapshot()
H A Dctree.c335 if (buf_gen > btrfs_root_last_snapshot(&root->root_item) && in btrfs_block_can_be_shared()
809 btrfs_set_root_used(&root->root_item, in root_add_used_bytes()
810 btrfs_root_used(&root->root_item) + root->fs_info->nodesize); in root_add_used_bytes()
817 btrfs_set_root_used(&root->root_item, in root_sub_used_bytes()
818 btrfs_root_used(&root->root_item) - root->fs_info->nodesize); in root_sub_used_bytes()
H A Dtree-log.c2824 struct btrfs_root_item *root_item) in update_log_root() argument
2832 &log->root_key, root_item); in update_log_root()
2835 &log->root_key, root_item); in update_log_root()
3062 btrfs_set_root_node(&log->root_item, log->node); in btrfs_sync_log()
3063 memcpy(&new_root_item, &log->root_item, sizeof(new_root_item)); in btrfs_sync_log()
7108 if (btrfs_root_refs(&root->root_item) == 0) in btrfs_log_inode_parent()
7115 if (btrfs_root_generation(&root->root_item) == trans->transid) in btrfs_log_inode_parent()