Lines Matching refs:num_bytes
452 u64 num_bytes) in btrfs_wait_block_group_cache_progress() argument
471 (cache->free_space_ctl->free_space >= num_bytes))); in btrfs_wait_block_group_cache_progress()
1364 u64 num_bytes; in inc_block_group_ro() local
1381 num_bytes = cache->length - cache->reserved - cache->pinned - in inc_block_group_ro()
1397 if (sinfo_used + num_bytes <= sinfo->total_bytes) in inc_block_group_ro()
1406 if (btrfs_can_overcommit(cache->fs_info, sinfo, num_bytes, in inc_block_group_ro()
1412 sinfo->bytes_readonly += num_bytes; in inc_block_group_ro()
2684 u64 start, u64 num_bytes) in insert_dev_extent() argument
2713 btrfs_set_dev_extent_length(leaf, extent, num_bytes); in insert_dev_extent()
3092 u64 num_bytes; in btrfs_dec_block_group_ro() local
3108 num_bytes = cache->length - cache->reserved - in btrfs_dec_block_group_ro()
3111 sinfo->bytes_readonly -= num_bytes; in btrfs_dec_block_group_ro()
3678 u64 bytenr, u64 num_bytes, bool alloc) in btrfs_update_block_group() argument
3692 old_val += num_bytes; in btrfs_update_block_group()
3694 old_val -= num_bytes; in btrfs_update_block_group()
3703 ASSERT(bytenr + num_bytes <= cache->start + cache->length); in btrfs_update_block_group()
3726 old_val += num_bytes; in btrfs_update_block_group()
3728 cache->reserved -= num_bytes; in btrfs_update_block_group()
3730 space_info->bytes_reserved -= num_bytes; in btrfs_update_block_group()
3731 space_info->bytes_used += num_bytes; in btrfs_update_block_group()
3732 space_info->disk_used += num_bytes * factor; in btrfs_update_block_group()
3734 btrfs_space_info_update_reclaimable(space_info, -num_bytes); in btrfs_update_block_group()
3738 old_val -= num_bytes; in btrfs_update_block_group()
3740 cache->pinned += num_bytes; in btrfs_update_block_group()
3741 btrfs_space_info_update_bytes_pinned(space_info, num_bytes); in btrfs_update_block_group()
3742 space_info->bytes_used -= num_bytes; in btrfs_update_block_group()
3743 space_info->disk_used -= num_bytes * factor; in btrfs_update_block_group()
3745 btrfs_space_info_update_reclaimable(space_info, num_bytes); in btrfs_update_block_group()
3747 reclaim = should_reclaim_block_group(cache, num_bytes); in btrfs_update_block_group()
3753 bytenr + num_bytes - 1, EXTENT_DIRTY, NULL); in btrfs_update_block_group()
3799 u64 ram_bytes, u64 num_bytes, int delalloc, in btrfs_add_reserved_bytes() argument
3814 size_class = btrfs_calc_block_group_size_class(num_bytes); in btrfs_add_reserved_bytes()
3819 cache->reserved += num_bytes; in btrfs_add_reserved_bytes()
3820 space_info->bytes_reserved += num_bytes; in btrfs_add_reserved_bytes()
3822 space_info->flags, num_bytes, 1); in btrfs_add_reserved_bytes()
3825 cache->delalloc_bytes += num_bytes; in btrfs_add_reserved_bytes()
3831 if (num_bytes < ram_bytes) in btrfs_add_reserved_bytes()
3851 void btrfs_free_reserved_bytes(struct btrfs_block_group *cache, u64 num_bytes, in btrfs_free_reserved_bytes() argument
3859 space_info->bytes_readonly += num_bytes; in btrfs_free_reserved_bytes()
3861 space_info->bytes_zone_unusable += num_bytes; in btrfs_free_reserved_bytes()
3862 cache->reserved -= num_bytes; in btrfs_free_reserved_bytes()
3863 space_info->bytes_reserved -= num_bytes; in btrfs_free_reserved_bytes()
3867 cache->delalloc_bytes -= num_bytes; in btrfs_free_reserved_bytes()