Home
last modified time | relevance | path

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

/linux-6.1.9/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 = true; in block_rsv_release_bytes()
[all …]
Dblock-rsv.h63 struct btrfs_block_rsv *block_rsv, u64 num_bytes,
65 int btrfs_block_rsv_check(struct btrfs_block_rsv *block_rsv, int min_factor);
67 struct btrfs_block_rsv *block_rsv, u64 min_reserved,
72 int btrfs_block_rsv_use_bytes(struct btrfs_block_rsv *block_rsv, u64 num_bytes);
76 void btrfs_block_rsv_add_bytes(struct btrfs_block_rsv *block_rsv,
79 struct btrfs_block_rsv *block_rsv,
88 struct btrfs_block_rsv *block_rsv, in btrfs_unuse_block_rsv() argument
91 btrfs_block_rsv_add_bytes(block_rsv, blocksize, false); in btrfs_unuse_block_rsv()
92 btrfs_block_rsv_release(fs_info, block_rsv, 0, NULL); in btrfs_unuse_block_rsv()
Ddelalloc-space.c219 struct btrfs_block_rsv *block_rsv = &inode->block_rsv; in btrfs_inode_rsv_release() local
228 released = btrfs_block_rsv_release(fs_info, block_rsv, 0, in btrfs_inode_rsv_release()
243 struct btrfs_block_rsv *block_rsv = &inode->block_rsv; in btrfs_calculate_inode_block_rsv_size() local
273 spin_lock(&block_rsv->lock); in btrfs_calculate_inode_block_rsv_size()
274 block_rsv->size = reserve_size; in btrfs_calculate_inode_block_rsv_size()
275 block_rsv->qgroup_rsv_size = qgroup_rsv_size; in btrfs_calculate_inode_block_rsv_size()
276 spin_unlock(&block_rsv->lock); in btrfs_calculate_inode_block_rsv_size()
303 struct btrfs_block_rsv *block_rsv = &inode->block_rsv; in btrfs_delalloc_reserve_metadata() local
347 ret = btrfs_reserve_metadata_bytes(fs_info, block_rsv, meta_reserve, flush); in btrfs_delalloc_reserve_metadata()
367 btrfs_block_rsv_add_bytes(block_rsv, meta_reserve, false); in btrfs_delalloc_reserve_metadata()
[all …]
Ddelayed-inode.c493 src_rsv = trans->block_rsv; in btrfs_delayed_item_reserve_metadata()
566 src_rsv = trans->block_rsv; in btrfs_delayed_inode_reserve_metadata()
1130 struct btrfs_block_rsv *block_rsv; in __btrfs_run_delayed_items() local
1141 block_rsv = trans->block_rsv; in __btrfs_run_delayed_items()
1142 trans->block_rsv = &fs_info->delayed_block_rsv; in __btrfs_run_delayed_items()
1165 trans->block_rsv = block_rsv; in __btrfs_run_delayed_items()
1185 struct btrfs_block_rsv *block_rsv; in btrfs_commit_inode_delayed_items() local
1205 block_rsv = trans->block_rsv; in btrfs_commit_inode_delayed_items()
1206 trans->block_rsv = &delayed_node->root->fs_info->delayed_block_rsv; in btrfs_commit_inode_delayed_items()
1212 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.c569 h->orig_rsv = h->block_rsv; in start_transaction()
570 h->block_rsv = NULL; in start_transaction()
691 h->block_rsv = &fs_info->trans_block_rsv; in start_transaction()
707 u64 flags = h->block_rsv->space_info->flags; in start_transaction()
958 if (!trans->block_rsv) { in btrfs_trans_release_metadata()
966 ASSERT(trans->block_rsv == &fs_info->trans_block_rsv); in btrfs_trans_release_metadata()
969 btrfs_block_rsv_release(fs_info, trans->block_rsv, in btrfs_trans_release_metadata()
983 trans->block_rsv = trans->orig_rsv; in __btrfs_end_transaction()
988 trans->block_rsv = NULL; in __btrfs_end_transaction()
1643 &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.h139 struct btrfs_block_rsv *block_rsv,
Dprops.c425 ret = btrfs_block_rsv_add(fs_info, trans->block_rsv, in btrfs_inode_inherit_props()
445 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 …]
Dbtrfs_inode.h232 struct btrfs_block_rsv block_rsv; member
Dsuper.c2340 struct btrfs_block_rsv *block_rsv = &fs_info->global_block_rsv; in btrfs_statfs() local
2379 spin_lock(&block_rsv->lock); in btrfs_statfs()
2381 if (buf->f_bfree >= block_rsv->size >> bits) in btrfs_statfs()
2382 buf->f_bfree -= block_rsv->size >> bits; in btrfs_statfs()
2385 spin_unlock(&block_rsv->lock); in btrfs_statfs()
2416 if (!mixed && block_rsv->space_info->full && in btrfs_statfs()
2417 total_free_meta - thresh < block_rsv->size) in btrfs_statfs()
Dspace-info.c1728 struct btrfs_block_rsv *block_rsv, in btrfs_reserve_metadata_bytes() argument
1734 ret = __reserve_bytes(fs_info, block_rsv->space_info, orig_bytes, flush); in btrfs_reserve_metadata_bytes()
1737 block_rsv->space_info->flags, in btrfs_reserve_metadata_bytes()
1741 btrfs_dump_space_info(fs_info, block_rsv->space_info, in btrfs_reserve_metadata_bytes()
Dinode.c426 trans->block_rsv = &inode->block_rsv; in cow_file_range_inline()
3265 trans->block_rsv = &inode->block_rsv; in btrfs_finish_ordered_io()
3285 trans->block_rsv = &inode->block_rsv; in btrfs_finish_ordered_io()
4662 struct btrfs_block_rsv block_rsv; in btrfs_delete_subvolume() local
4697 btrfs_init_block_rsv(&block_rsv, BTRFS_BLOCK_RSV_TEMP); in btrfs_delete_subvolume()
4703 ret = btrfs_subvolume_reserve_metadata(root, &block_rsv, 5, true); in btrfs_delete_subvolume()
4712 trans->block_rsv = &block_rsv; in btrfs_delete_subvolume()
4713 trans->bytes_reserved = block_rsv.size; in btrfs_delete_subvolume()
4765 trans->block_rsv = NULL; in btrfs_delete_subvolume()
4770 btrfs_subvolume_release_metadata(root, &block_rsv); in btrfs_delete_subvolume()
[all …]
Dsysfs.c644 struct btrfs_block_rsv *block_rsv = &fs_info->global_block_rsv; in global_rsv_size_show() local
645 return btrfs_show_u64(&block_rsv->size, &block_rsv->lock, buf); in global_rsv_size_show()
653 struct btrfs_block_rsv *block_rsv = &fs_info->global_block_rsv; in global_rsv_reserved_show() local
654 return btrfs_show_u64(&block_rsv->reserved, &block_rsv->lock, buf); in global_rsv_reserved_show()
Dfile.c2688 trans->block_rsv = rsv; in btrfs_replace_file_extents()
2717 trans->block_rsv = &fs_info->trans_block_rsv; in btrfs_replace_file_extents()
2808 trans->block_rsv = rsv; in btrfs_replace_file_extents()
2835 trans->block_rsv = &fs_info->trans_block_rsv; in btrfs_replace_file_extents()
2887 trans->block_rsv = &fs_info->trans_block_rsv; in btrfs_replace_file_extents()
Dextent-tree.c4957 struct btrfs_block_rsv *block_rsv; in btrfs_alloc_tree_block() local
4976 block_rsv = btrfs_use_block_rsv(trans, root, blocksize); in btrfs_alloc_tree_block()
4977 if (IS_ERR(block_rsv)) in btrfs_alloc_tree_block()
4978 return ERR_CAST(block_rsv); in btrfs_alloc_tree_block()
5033 btrfs_unuse_block_rsv(fs_info, block_rsv, blocksize); in btrfs_alloc_tree_block()
Dctree.h1338 struct btrfs_block_rsv *block_rsv; member