Lines Matching defs:cluster_bg
3510 struct btrfs_block_group *cluster_bg;
3516 cluster_bg = btrfs_lock_cluster(bg, last_ptr, ffe_ctl->delalloc);
3517 if (!cluster_bg)
3519 if (cluster_bg != bg && (cluster_bg->ro ||
3520 !block_group_bits(cluster_bg, ffe_ctl->flags)))
3523 offset = btrfs_alloc_from_cluster(cluster_bg, last_ptr,
3524 ffe_ctl->num_bytes, cluster_bg->start,
3529 trace_btrfs_reserve_extent_cluster(cluster_bg, ffe_ctl);
3530 *cluster_bg_ret = cluster_bg;
3534 WARN_ON(last_ptr->block_group != cluster_bg);
3548 if (ffe_ctl->loop >= LOOP_NO_EMPTY_SIZE && cluster_bg != bg) {
3550 btrfs_release_block_group(cluster_bg, ffe_ctl->delalloc);
3557 if (cluster_bg != bg)
3558 btrfs_release_block_group(cluster_bg, ffe_ctl->delalloc);