| /Linux-v5.4/fs/btrfs/ |
| D | block-rsv.c | 10 struct btrfs_block_rsv *block_rsv, in block_rsv_release_bytes() argument 14 struct btrfs_space_info *space_info = block_rsv->space_info; in block_rsv_release_bytes() 18 spin_lock(&block_rsv->lock); in block_rsv_release_bytes() 20 num_bytes = block_rsv->size; in block_rsv_release_bytes() 21 qgroup_to_release = block_rsv->qgroup_rsv_size; in block_rsv_release_bytes() 23 block_rsv->size -= num_bytes; in block_rsv_release_bytes() 24 if (block_rsv->reserved >= block_rsv->size) { in block_rsv_release_bytes() 25 num_bytes = block_rsv->reserved - block_rsv->size; in block_rsv_release_bytes() 26 block_rsv->reserved = block_rsv->size; in block_rsv_release_bytes() 27 block_rsv->full = 1; in block_rsv_release_bytes() [all …]
|
| D | block-rsv.h | 61 struct btrfs_block_rsv *block_rsv, u64 num_bytes, 63 int btrfs_block_rsv_check(struct btrfs_block_rsv *block_rsv, int min_factor); 65 struct btrfs_block_rsv *block_rsv, u64 min_reserved, 70 int btrfs_block_rsv_use_bytes(struct btrfs_block_rsv *block_rsv, u64 num_bytes); 74 void btrfs_block_rsv_add_bytes(struct btrfs_block_rsv *block_rsv, 77 struct btrfs_block_rsv *block_rsv, 87 struct btrfs_block_rsv *block_rsv, in btrfs_block_rsv_release() argument 90 __btrfs_block_rsv_release(fs_info, block_rsv, num_bytes, NULL); in btrfs_block_rsv_release() 94 struct btrfs_block_rsv *block_rsv, in btrfs_unuse_block_rsv() argument 97 btrfs_block_rsv_add_bytes(block_rsv, blocksize, false); in btrfs_unuse_block_rsv() [all …]
|
| D | delalloc-space.c | 222 struct btrfs_block_rsv *block_rsv = &inode->block_rsv; in btrfs_inode_rsv_release() local 231 released = __btrfs_block_rsv_release(fs_info, block_rsv, 0, in btrfs_inode_rsv_release() 246 struct btrfs_block_rsv *block_rsv = &inode->block_rsv; in btrfs_calculate_inode_block_rsv_size() local 276 spin_lock(&block_rsv->lock); in btrfs_calculate_inode_block_rsv_size() 277 block_rsv->size = reserve_size; in btrfs_calculate_inode_block_rsv_size() 278 block_rsv->qgroup_rsv_size = qgroup_rsv_size; in btrfs_calculate_inode_block_rsv_size() 279 spin_unlock(&block_rsv->lock); in btrfs_calculate_inode_block_rsv_size() 305 struct btrfs_block_rsv *block_rsv = &inode->block_rsv; in btrfs_delalloc_reserve_metadata() local 352 ret = btrfs_reserve_metadata_bytes(root, block_rsv, meta_reserve, flush); in btrfs_delalloc_reserve_metadata() 370 btrfs_block_rsv_add_bytes(block_rsv, meta_reserve, false); in btrfs_delalloc_reserve_metadata() [all …]
|
| D | delayed-inode.c | 559 src_rsv = trans->block_rsv; in btrfs_delayed_item_reserve_metadata() 613 src_rsv = trans->block_rsv; in btrfs_delayed_inode_reserve_metadata() 1137 struct btrfs_block_rsv *block_rsv; in __btrfs_run_delayed_items() local 1149 block_rsv = trans->block_rsv; in __btrfs_run_delayed_items() 1150 trans->block_rsv = &fs_info->delayed_block_rsv; in __btrfs_run_delayed_items() 1173 trans->block_rsv = block_rsv; in __btrfs_run_delayed_items() 1193 struct btrfs_block_rsv *block_rsv; in btrfs_commit_inode_delayed_items() local 1214 block_rsv = trans->block_rsv; in btrfs_commit_inode_delayed_items() 1215 trans->block_rsv = &delayed_node->root->fs_info->delayed_block_rsv; in btrfs_commit_inode_delayed_items() 1221 trans->block_rsv = block_rsv; in btrfs_commit_inode_delayed_items() [all …]
|
| D | delayed-ref.c | 81 struct btrfs_block_rsv *block_rsv = &fs_info->delayed_refs_rsv; in btrfs_delayed_refs_rsv_release() local 85 released = __btrfs_block_rsv_release(fs_info, block_rsv, num_bytes, in btrfs_delayed_refs_rsv_release() 176 struct btrfs_block_rsv *block_rsv = &fs_info->delayed_refs_rsv; in btrfs_delayed_refs_rsv_refill() local 181 spin_lock(&block_rsv->lock); in btrfs_delayed_refs_rsv_refill() 182 if (block_rsv->reserved < block_rsv->size) { in btrfs_delayed_refs_rsv_refill() 183 num_bytes = block_rsv->size - block_rsv->reserved; in btrfs_delayed_refs_rsv_refill() 186 spin_unlock(&block_rsv->lock); in btrfs_delayed_refs_rsv_refill() 191 ret = btrfs_reserve_metadata_bytes(fs_info->extent_root, block_rsv, in btrfs_delayed_refs_rsv_refill() 195 btrfs_block_rsv_add_bytes(block_rsv, num_bytes, 0); in btrfs_delayed_refs_rsv_refill()
|
| D | transaction.c | 463 h->orig_rsv = h->block_rsv; in start_transaction() 464 h->block_rsv = NULL; in start_transaction() 583 h->block_rsv = &fs_info->trans_block_rsv; in start_transaction() 648 trans->block_rsv = &fs_info->trans_block_rsv; in btrfs_start_transaction_fallback_global_rsv() 813 if (!trans->block_rsv) { in btrfs_trans_release_metadata() 821 ASSERT(trans->block_rsv == &fs_info->trans_block_rsv); in btrfs_trans_release_metadata() 824 btrfs_block_rsv_release(fs_info, trans->block_rsv, in btrfs_trans_release_metadata() 839 trans->block_rsv = trans->orig_rsv; in __btrfs_end_transaction() 844 trans->block_rsv = NULL; in __btrfs_end_transaction() 1436 &pending->block_rsv, in create_pending_snapshot() [all …]
|
| D | inode-map.c | 428 rsv = trans->block_rsv; in btrfs_save_ino_cache() 429 trans->block_rsv = &fs_info->trans_block_rsv; in btrfs_save_ino_cache() 440 ret = btrfs_block_rsv_add(root, trans->block_rsv, in btrfs_save_ino_cache() 516 btrfs_block_rsv_release(fs_info, trans->block_rsv, in btrfs_save_ino_cache() 519 trans->block_rsv = rsv; in btrfs_save_ino_cache()
|
| D | transaction.h | 115 struct btrfs_block_rsv *block_rsv; member 139 struct btrfs_block_rsv block_rsv; member
|
| D | relocation.c | 156 struct btrfs_block_rsv *block_rsv; member 1456 rsv = trans->block_rsv; in btrfs_init_reloc_root() 1457 trans->block_rsv = rc->block_rsv; in btrfs_init_reloc_root() 1462 trans->block_rsv = rsv; in btrfs_init_reloc_root() 2276 ret = btrfs_block_rsv_refill(root, rc->block_rsv, min_reserved, in merge_reloc_root() 2288 trans->block_rsv = rc->block_rsv; in merge_reloc_root() 2388 ret = btrfs_block_rsv_add(root, rc->block_rsv, num_bytes, in prepare_to_merge() 2397 btrfs_block_rsv_release(fs_info, rc->block_rsv, in prepare_to_merge() 2405 btrfs_block_rsv_release(fs_info, rc->block_rsv, in prepare_to_merge() 2699 trans->block_rsv = rc->block_rsv; in reserve_metadata_space() [all …]
|
| D | space-info.c | 1090 struct btrfs_block_rsv *block_rsv, in btrfs_reserve_metadata_bytes() argument 1099 ret = __reserve_metadata_bytes(fs_info, block_rsv->space_info, in btrfs_reserve_metadata_bytes() 1103 if (block_rsv != global_rsv && in btrfs_reserve_metadata_bytes() 1109 block_rsv->space_info->flags, in btrfs_reserve_metadata_bytes() 1113 btrfs_dump_space_info(fs_info, block_rsv->space_info, in btrfs_reserve_metadata_bytes()
|
| D | sysfs.c | 348 struct btrfs_block_rsv *block_rsv = &fs_info->global_block_rsv; in global_rsv_size_show() local 349 return btrfs_show_u64(&block_rsv->size, &block_rsv->lock, buf); in global_rsv_size_show() 357 struct btrfs_block_rsv *block_rsv = &fs_info->global_block_rsv; in global_rsv_reserved_show() local 358 return btrfs_show_u64(&block_rsv->reserved, &block_rsv->lock, buf); in global_rsv_reserved_show()
|
| D | space-info.h | 126 struct btrfs_block_rsv *block_rsv,
|
| D | props.c | 366 ret = btrfs_block_rsv_add(root, trans->block_rsv, in inherit_props() 385 btrfs_block_rsv_release(fs_info, trans->block_rsv, in inherit_props()
|
| D | ioctl.c | 569 struct btrfs_block_rsv block_rsv; in create_subvol() local 596 btrfs_init_block_rsv(&block_rsv, BTRFS_BLOCK_RSV_TEMP); in create_subvol() 601 ret = btrfs_subvolume_reserve_metadata(root, &block_rsv, 8, false); in create_subvol() 608 btrfs_subvolume_release_metadata(fs_info, &block_rsv); in create_subvol() 611 trans->block_rsv = &block_rsv; in create_subvol() 612 trans->bytes_reserved = block_rsv.size; in create_subvol() 721 trans->block_rsv = NULL; in create_subvol() 723 btrfs_subvolume_release_metadata(fs_info, &block_rsv); in create_subvol() 807 btrfs_init_block_rsv(&pending_snapshot->block_rsv, in create_snapshot() 818 &pending_snapshot->block_rsv, 8, in create_snapshot() [all …]
|
| D | btrfs_inode.h | 167 struct btrfs_block_rsv block_rsv; member
|
| D | super.c | 2033 struct btrfs_block_rsv *block_rsv = &fs_info->global_block_rsv; in btrfs_statfs() local 2075 spin_lock(&block_rsv->lock); in btrfs_statfs() 2077 if (buf->f_bfree >= block_rsv->size >> bits) in btrfs_statfs() 2078 buf->f_bfree -= block_rsv->size >> bits; in btrfs_statfs() 2081 spin_unlock(&block_rsv->lock); in btrfs_statfs() 2105 if (!mixed && total_free_meta - thresh < block_rsv->size) in btrfs_statfs()
|
| D | inode.c | 308 trans->block_rsv = &BTRFS_I(inode)->block_rsv; in cow_file_range_inline() 3081 trans->block_rsv = &BTRFS_I(inode)->block_rsv; in btrfs_finish_ordered_io() 3117 trans->block_rsv = &BTRFS_I(inode)->block_rsv; in btrfs_finish_ordered_io() 4405 struct btrfs_block_rsv block_rsv; in btrfs_delete_subvolume() local 4434 btrfs_init_block_rsv(&block_rsv, BTRFS_BLOCK_RSV_TEMP); in btrfs_delete_subvolume() 4440 err = btrfs_subvolume_reserve_metadata(root, &block_rsv, 5, true); in btrfs_delete_subvolume() 4449 trans->block_rsv = &block_rsv; in btrfs_delete_subvolume() 4450 trans->bytes_reserved = block_rsv.size; in btrfs_delete_subvolume() 4501 trans->block_rsv = NULL; in btrfs_delete_subvolume() 4508 btrfs_subvolume_release_metadata(fs_info, &block_rsv); in btrfs_delete_subvolume() [all …]
|
| D | extent-tree.c | 4476 struct btrfs_block_rsv *block_rsv; in btrfs_alloc_tree_block() local 4495 block_rsv = btrfs_use_block_rsv(trans, root, blocksize); in btrfs_alloc_tree_block() 4496 if (IS_ERR(block_rsv)) in btrfs_alloc_tree_block() 4497 return ERR_CAST(block_rsv); in btrfs_alloc_tree_block() 4553 btrfs_unuse_block_rsv(fs_info, block_rsv, blocksize); in btrfs_alloc_tree_block() 5175 struct btrfs_block_rsv *block_rsv, int update_ref, in btrfs_drop_snapshot() argument 5215 if (block_rsv) in btrfs_drop_snapshot() 5216 trans->block_rsv = block_rsv; in btrfs_drop_snapshot() 5345 if (block_rsv) in btrfs_drop_snapshot() 5346 trans->block_rsv = block_rsv; in btrfs_drop_snapshot()
|
| D | file.c | 2566 trans->block_rsv = rsv; in btrfs_punch_hole_range() 2586 trans->block_rsv = &fs_info->trans_block_rsv; in btrfs_punch_hole_range() 2637 trans->block_rsv = rsv; in btrfs_punch_hole_range() 2665 trans->block_rsv = &fs_info->trans_block_rsv; in btrfs_punch_hole_range() 2706 trans->block_rsv = &fs_info->trans_block_rsv; in btrfs_punch_hole_range()
|
| D | ctree.h | 978 struct btrfs_block_rsv *block_rsv; member 2620 struct btrfs_block_rsv *block_rsv,
|
| D | disk-io.c | 1148 root->block_rsv = NULL; in __setup_root()
|