Lines Matching refs:reserved
120 if (block_rsv->reserved >= block_rsv->size) { in block_rsv_release_bytes()
121 num_bytes = block_rsv->reserved - block_rsv->size; in block_rsv_release_bytes()
122 block_rsv->reserved = block_rsv->size; in block_rsv_release_bytes()
143 bytes_to_add = dest->size - dest->reserved; in block_rsv_release_bytes()
145 dest->reserved += bytes_to_add; in block_rsv_release_bytes()
146 if (dest->reserved >= dest->size) in block_rsv_release_bytes()
240 if (block_rsv->reserved >= num_bytes) in btrfs_block_rsv_check()
259 if (block_rsv->reserved >= num_bytes) in btrfs_block_rsv_refill()
262 num_bytes -= block_rsv->reserved; in btrfs_block_rsv_refill()
306 if (block_rsv->reserved >= num_bytes) { in btrfs_block_rsv_use_bytes()
307 block_rsv->reserved -= num_bytes; in btrfs_block_rsv_use_bytes()
308 if (block_rsv->reserved < block_rsv->size) in btrfs_block_rsv_use_bytes()
320 block_rsv->reserved += num_bytes; in btrfs_block_rsv_add_bytes()
323 else if (block_rsv->reserved >= block_rsv->size) in btrfs_block_rsv_add_bytes()
375 if (block_rsv->reserved < block_rsv->size) { in btrfs_update_global_block_rsv()
376 num_bytes = block_rsv->size - block_rsv->reserved; in btrfs_update_global_block_rsv()
379 block_rsv->reserved = block_rsv->size; in btrfs_update_global_block_rsv()
380 } else if (block_rsv->reserved > block_rsv->size) { in btrfs_update_global_block_rsv()
381 num_bytes = block_rsv->reserved - block_rsv->size; in btrfs_update_global_block_rsv()
384 block_rsv->reserved = block_rsv->size; in btrfs_update_global_block_rsv()
388 block_rsv->full = (block_rsv->reserved == block_rsv->size); in btrfs_update_global_block_rsv()
443 WARN_ON(fs_info->trans_block_rsv.reserved > 0); in btrfs_release_global_block_rsv()
445 WARN_ON(fs_info->chunk_block_rsv.reserved > 0); in btrfs_release_global_block_rsv()
447 WARN_ON(fs_info->delayed_block_rsv.reserved > 0); in btrfs_release_global_block_rsv()
448 WARN_ON(fs_info->delayed_refs_rsv.reserved > 0); in btrfs_release_global_block_rsv()