Lines Matching refs:last_ptr

3469 	struct btrfs_free_cluster *last_ptr;  member
3534 struct btrfs_free_cluster *last_ptr = ffe_ctl->last_ptr; in find_free_extent_clustered() local
3539 cluster_bg = btrfs_lock_cluster(bg, last_ptr, ffe_ctl->delalloc); in find_free_extent_clustered()
3546 offset = btrfs_alloc_from_cluster(cluster_bg, last_ptr, in find_free_extent_clustered()
3551 spin_unlock(&last_ptr->refill_lock); in find_free_extent_clustered()
3558 WARN_ON(last_ptr->block_group != cluster_bg); in find_free_extent_clustered()
3573 spin_unlock(&last_ptr->refill_lock); in find_free_extent_clustered()
3579 btrfs_return_cluster_to_free_space(NULL, last_ptr); in find_free_extent_clustered()
3586 spin_unlock(&last_ptr->refill_lock); in find_free_extent_clustered()
3593 ret = btrfs_find_space_cluster(bg, last_ptr, ffe_ctl->search_start, in find_free_extent_clustered()
3597 offset = btrfs_alloc_from_cluster(bg, last_ptr, in find_free_extent_clustered()
3602 spin_unlock(&last_ptr->refill_lock); in find_free_extent_clustered()
3611 spin_unlock(&last_ptr->refill_lock); in find_free_extent_clustered()
3623 btrfs_return_cluster_to_free_space(NULL, last_ptr); in find_free_extent_clustered()
3624 spin_unlock(&last_ptr->refill_lock); in find_free_extent_clustered()
3636 struct btrfs_free_cluster *last_ptr = ffe_ctl->last_ptr; in find_free_extent_unclustered() local
3644 if (unlikely(last_ptr)) { in find_free_extent_unclustered()
3645 spin_lock(&last_ptr->lock); in find_free_extent_unclustered()
3646 last_ptr->fragmented = 1; in find_free_extent_unclustered()
3647 spin_unlock(&last_ptr->lock); in find_free_extent_unclustered()
3699 if (ffe_ctl->last_ptr && ffe_ctl->use_cluster) { in do_allocation_clustered()
3935 struct btrfs_free_cluster *last_ptr = ffe_ctl->last_ptr; in found_extent_clustered() local
3937 if (!ffe_ctl->use_cluster && last_ptr) { in found_extent_clustered()
3938 spin_lock(&last_ptr->lock); in found_extent_clustered()
3939 last_ptr->window_start = ins->objectid; in found_extent_clustered()
3940 spin_unlock(&last_ptr->lock); in found_extent_clustered()
4175 ffe_ctl->last_ptr = fetch_cluster_info(fs_info, space_info, in prepare_allocation_clustered()
4177 if (ffe_ctl->last_ptr) { in prepare_allocation_clustered()
4178 struct btrfs_free_cluster *last_ptr = ffe_ctl->last_ptr; in prepare_allocation_clustered() local
4180 spin_lock(&last_ptr->lock); in prepare_allocation_clustered()
4181 if (last_ptr->block_group) in prepare_allocation_clustered()
4182 ffe_ctl->hint_byte = last_ptr->window_start; in prepare_allocation_clustered()
4183 if (last_ptr->fragmented) { in prepare_allocation_clustered()
4189 ffe_ctl->hint_byte = last_ptr->window_start; in prepare_allocation_clustered()
4192 spin_unlock(&last_ptr->lock); in prepare_allocation_clustered()
4267 ffe_ctl->last_ptr = NULL; in find_free_extent()