Lines Matching refs:block_group
299 struct btrfs_block_group *block_group)
304 factor = btrfs_bg_type_to_factor(block_group->flags);
306 found = btrfs_find_space_info(info, block_group->flags);
309 found->total_bytes += block_group->length;
310 found->disk_total += block_group->length * factor;
311 found->bytes_used += block_group->used;
312 found->disk_used += block_group->used * factor;
313 found->bytes_readonly += block_group->bytes_super;
314 found->bytes_zone_unusable += block_group->zone_unusable;
315 if (block_group->length > 0)
320 block_group->space_info = found;
322 index = btrfs_bg_flags_to_raid_index(block_group->flags);
324 list_add_tail(&block_group->list, &found->block_groups[index]);
1844 struct btrfs_block_group *block_group;
1853 list_for_each_entry(block_group, &sinfo->ro_bgs, ro_list) {
1854 spin_lock(&block_group->lock);
1856 if (!block_group->ro) {
1857 spin_unlock(&block_group->lock);
1861 factor = btrfs_bg_type_to_factor(block_group->flags);
1862 free_bytes += (block_group->length -
1863 block_group->used) * factor;
1865 spin_unlock(&block_group->lock);