Home
last modified time | relevance | path

Searched refs:block_rsv (Results 1 – 19 of 19) sorted by relevance

/linux-5.19.10/fs/btrfs/
Dblock-rsv.c104 struct btrfs_block_rsv *block_rsv, in block_rsv_release_bytes() argument
108 struct btrfs_space_info *space_info = block_rsv->space_info; in block_rsv_release_bytes()
112 spin_lock(&block_rsv->lock); in block_rsv_release_bytes()
114 num_bytes = block_rsv->size; in block_rsv_release_bytes()
115 qgroup_to_release = block_rsv->qgroup_rsv_size; in block_rsv_release_bytes()
117 block_rsv->size -= num_bytes; in block_rsv_release_bytes()
118 if (block_rsv->reserved >= block_rsv->size) { in block_rsv_release_bytes()
119 num_bytes = block_rsv->reserved - block_rsv->size; in block_rsv_release_bytes()
120 block_rsv->reserved = block_rsv->size; in block_rsv_release_bytes()
121 block_rsv->full = 1; in block_rsv_release_bytes()
[all …]
Dblock-rsv.h62 struct btrfs_block_rsv *block_rsv, u64 num_bytes,
64 int btrfs_block_rsv_check(struct btrfs_block_rsv *block_rsv, int min_factor);
66 struct btrfs_block_rsv *block_rsv, u64 min_reserved,
71 int btrfs_block_rsv_use_bytes(struct btrfs_block_rsv *block_rsv, u64 num_bytes);
75 void btrfs_block_rsv_add_bytes(struct btrfs_block_rsv *block_rsv,
78 struct btrfs_block_rsv *block_rsv,
87 struct btrfs_block_rsv *block_rsv, in btrfs_unuse_block_rsv() argument
90 btrfs_block_rsv_add_bytes(block_rsv, blocksize, false); in btrfs_unuse_block_rsv()
91 btrfs_block_rsv_release(fs_info, block_rsv, 0, NULL); in btrfs_unuse_block_rsv()
Ddelalloc-space.c212 struct btrfs_block_rsv *block_rsv = &inode->block_rsv; in btrfs_inode_rsv_release() local
221 released = btrfs_block_rsv_release(fs_info, block_rsv, 0, in btrfs_inode_rsv_release()
236 struct btrfs_block_rsv *block_rsv = &inode->block_rsv; in btrfs_calculate_inode_block_rsv_size() local
266 spin_lock(&block_rsv->lock); in btrfs_calculate_inode_block_rsv_size()
267 block_rsv->size = reserve_size; in btrfs_calculate_inode_block_rsv_size()
268 block_rsv->qgroup_rsv_size = qgroup_rsv_size; in btrfs_calculate_inode_block_rsv_size()
269 spin_unlock(&block_rsv->lock); in btrfs_calculate_inode_block_rsv_size()
296 struct btrfs_block_rsv *block_rsv = &inode->block_rsv; in btrfs_delalloc_reserve_metadata() local
340 ret = btrfs_reserve_metadata_bytes(fs_info, block_rsv, meta_reserve, flush); in btrfs_delalloc_reserve_metadata()
360 btrfs_block_rsv_add_bytes(block_rsv, meta_reserve, false); in btrfs_delalloc_reserve_metadata()
[all …]
Ddelayed-inode.c561 src_rsv = trans->block_rsv; in btrfs_delayed_item_reserve_metadata()
613 src_rsv = trans->block_rsv; in btrfs_delayed_inode_reserve_metadata()
1069 struct btrfs_block_rsv *block_rsv; in __btrfs_run_delayed_items() local
1080 block_rsv = trans->block_rsv; in __btrfs_run_delayed_items()
1081 trans->block_rsv = &fs_info->delayed_block_rsv; in __btrfs_run_delayed_items()
1104 trans->block_rsv = block_rsv; in __btrfs_run_delayed_items()
1124 struct btrfs_block_rsv *block_rsv; in btrfs_commit_inode_delayed_items() local
1144 block_rsv = trans->block_rsv; in btrfs_commit_inode_delayed_items()
1145 trans->block_rsv = &delayed_node->root->fs_info->delayed_block_rsv; in btrfs_commit_inode_delayed_items()
1151 trans->block_rsv = block_rsv; in btrfs_commit_inode_delayed_items()
[all …]
Ddelayed-ref.c83 struct btrfs_block_rsv *block_rsv = &fs_info->delayed_refs_rsv; in btrfs_delayed_refs_rsv_release() local
98 released = btrfs_block_rsv_release(fs_info, block_rsv, num_bytes, NULL); in btrfs_delayed_refs_rsv_release()
201 struct btrfs_block_rsv *block_rsv = &fs_info->delayed_refs_rsv; in btrfs_delayed_refs_rsv_refill() local
206 spin_lock(&block_rsv->lock); in btrfs_delayed_refs_rsv_refill()
207 if (block_rsv->reserved < block_rsv->size) { in btrfs_delayed_refs_rsv_refill()
208 num_bytes = block_rsv->size - block_rsv->reserved; in btrfs_delayed_refs_rsv_refill()
211 spin_unlock(&block_rsv->lock); in btrfs_delayed_refs_rsv_refill()
216 ret = btrfs_reserve_metadata_bytes(fs_info, block_rsv, num_bytes, flush); in btrfs_delayed_refs_rsv_refill()
219 btrfs_block_rsv_add_bytes(block_rsv, num_bytes, 0); in btrfs_delayed_refs_rsv_refill()
Dtransaction.c599 h->orig_rsv = h->block_rsv; in start_transaction()
600 h->block_rsv = NULL; in start_transaction()
721 h->block_rsv = &fs_info->trans_block_rsv; in start_transaction()
737 u64 flags = h->block_rsv->space_info->flags; in start_transaction()
979 if (!trans->block_rsv) { in btrfs_trans_release_metadata()
987 ASSERT(trans->block_rsv == &fs_info->trans_block_rsv); in btrfs_trans_release_metadata()
990 btrfs_block_rsv_release(fs_info, trans->block_rsv, in btrfs_trans_release_metadata()
1004 trans->block_rsv = trans->orig_rsv; in __btrfs_end_transaction()
1009 trans->block_rsv = NULL; in __btrfs_end_transaction()
1660 &pending->block_rsv, in create_pending_snapshot()
[all …]
Dtransaction.h124 struct btrfs_block_rsv *block_rsv; member
161 struct btrfs_block_rsv block_rsv; member
Drelocation.c126 struct btrfs_block_rsv *block_rsv; member
878 rsv = trans->block_rsv; in btrfs_init_reloc_root()
879 trans->block_rsv = rc->block_rsv; in btrfs_init_reloc_root()
884 trans->block_rsv = rsv; in btrfs_init_reloc_root()
1742 ret = btrfs_block_rsv_refill(fs_info, rc->block_rsv, in merge_reloc_root()
1765 trans->block_rsv = rc->block_rsv; in merge_reloc_root()
1862 ret = btrfs_block_rsv_add(fs_info, rc->block_rsv, num_bytes, in prepare_to_merge()
1871 btrfs_block_rsv_release(fs_info, rc->block_rsv, in prepare_to_merge()
1879 btrfs_block_rsv_release(fs_info, rc->block_rsv, in prepare_to_merge()
2322 trans->block_rsv = rc->block_rsv; in reserve_metadata_space()
[all …]
Dspace-info.h141 struct btrfs_block_rsv *block_rsv,
Dprops.c428 ret = btrfs_block_rsv_add(fs_info, trans->block_rsv, in btrfs_inode_inherit_props()
448 btrfs_block_rsv_release(fs_info, trans->block_rsv, in btrfs_inode_inherit_props()
Dioctl.c582 struct btrfs_block_rsv block_rsv; in create_subvol() local
625 btrfs_init_block_rsv(&block_rsv, BTRFS_BLOCK_RSV_TEMP); in create_subvol()
626 ret = btrfs_subvolume_reserve_metadata(root, &block_rsv, in create_subvol()
634 btrfs_subvolume_release_metadata(root, &block_rsv); in create_subvol()
637 trans->block_rsv = &block_rsv; in create_subvol()
638 trans->bytes_reserved = block_rsv.size; in create_subvol()
743 trans->block_rsv = NULL; in create_subvol()
745 btrfs_subvolume_release_metadata(root, &block_rsv); in create_subvol()
805 btrfs_init_block_rsv(&pending_snapshot->block_rsv, in create_snapshot()
814 &pending_snapshot->block_rsv, in create_snapshot()
[all …]
Dspace-info.c1704 struct btrfs_block_rsv *block_rsv, in btrfs_reserve_metadata_bytes() argument
1710 ret = __reserve_bytes(fs_info, block_rsv->space_info, orig_bytes, flush); in btrfs_reserve_metadata_bytes()
1713 block_rsv->space_info->flags, in btrfs_reserve_metadata_bytes()
1717 btrfs_dump_space_info(fs_info, block_rsv->space_info, in btrfs_reserve_metadata_bytes()
Dsuper.c2348 struct btrfs_block_rsv *block_rsv = &fs_info->global_block_rsv; in btrfs_statfs() local
2387 spin_lock(&block_rsv->lock); in btrfs_statfs()
2389 if (buf->f_bfree >= block_rsv->size >> bits) in btrfs_statfs()
2390 buf->f_bfree -= block_rsv->size >> bits; in btrfs_statfs()
2393 spin_unlock(&block_rsv->lock); in btrfs_statfs()
2424 if (!mixed && block_rsv->space_info->full && in btrfs_statfs()
2425 total_free_meta - thresh < block_rsv->size) in btrfs_statfs()
Dsysfs.c637 struct btrfs_block_rsv *block_rsv = &fs_info->global_block_rsv; in global_rsv_size_show() local
638 return btrfs_show_u64(&block_rsv->size, &block_rsv->lock, buf); in global_rsv_size_show()
646 struct btrfs_block_rsv *block_rsv = &fs_info->global_block_rsv; in global_rsv_reserved_show() local
647 return btrfs_show_u64(&block_rsv->reserved, &block_rsv->lock, buf); in global_rsv_reserved_show()
Dbtrfs_inode.h229 struct btrfs_block_rsv block_rsv; member
Dinode.c425 trans->block_rsv = &inode->block_rsv; in cow_file_range_inline()
3278 trans->block_rsv = &inode->block_rsv; in btrfs_finish_ordered_io()
3298 trans->block_rsv = &inode->block_rsv; in btrfs_finish_ordered_io()
4667 struct btrfs_block_rsv block_rsv; in btrfs_delete_subvolume() local
4702 btrfs_init_block_rsv(&block_rsv, BTRFS_BLOCK_RSV_TEMP); in btrfs_delete_subvolume()
4708 ret = btrfs_subvolume_reserve_metadata(root, &block_rsv, 5, true); in btrfs_delete_subvolume()
4717 trans->block_rsv = &block_rsv; in btrfs_delete_subvolume()
4718 trans->bytes_reserved = block_rsv.size; in btrfs_delete_subvolume()
4770 trans->block_rsv = NULL; in btrfs_delete_subvolume()
4775 btrfs_subvolume_release_metadata(root, &block_rsv); in btrfs_delete_subvolume()
[all …]
Dfile.c2763 trans->block_rsv = rsv; in btrfs_replace_file_extents()
2792 trans->block_rsv = &fs_info->trans_block_rsv; in btrfs_replace_file_extents()
2883 trans->block_rsv = rsv; in btrfs_replace_file_extents()
2910 trans->block_rsv = &fs_info->trans_block_rsv; in btrfs_replace_file_extents()
2962 trans->block_rsv = &fs_info->trans_block_rsv; in btrfs_replace_file_extents()
Dextent-tree.c4964 struct btrfs_block_rsv *block_rsv; in btrfs_alloc_tree_block() local
4983 block_rsv = btrfs_use_block_rsv(trans, root, blocksize); in btrfs_alloc_tree_block()
4984 if (IS_ERR(block_rsv)) in btrfs_alloc_tree_block()
4985 return ERR_CAST(block_rsv); in btrfs_alloc_tree_block()
5040 btrfs_unuse_block_rsv(fs_info, block_rsv, blocksize); in btrfs_alloc_tree_block()
Dctree.h1189 struct btrfs_block_rsv *block_rsv; member