Lines Matching refs:last_ptr

3576 	struct btrfs_free_cluster *last_ptr;  member
3635 struct btrfs_free_cluster *last_ptr = ffe_ctl->last_ptr; in find_free_extent_clustered() local
3640 cluster_bg = btrfs_lock_cluster(bg, last_ptr, ffe_ctl->delalloc); in find_free_extent_clustered()
3647 offset = btrfs_alloc_from_cluster(cluster_bg, last_ptr, in find_free_extent_clustered()
3652 spin_unlock(&last_ptr->refill_lock); in find_free_extent_clustered()
3659 WARN_ON(last_ptr->block_group != cluster_bg); in find_free_extent_clustered()
3674 spin_unlock(&last_ptr->refill_lock); in find_free_extent_clustered()
3680 btrfs_return_cluster_to_free_space(NULL, last_ptr); in find_free_extent_clustered()
3687 spin_unlock(&last_ptr->refill_lock); in find_free_extent_clustered()
3694 ret = btrfs_find_space_cluster(bg, last_ptr, ffe_ctl->search_start, in find_free_extent_clustered()
3698 offset = btrfs_alloc_from_cluster(bg, last_ptr, in find_free_extent_clustered()
3703 spin_unlock(&last_ptr->refill_lock); in find_free_extent_clustered()
3712 spin_unlock(&last_ptr->refill_lock); in find_free_extent_clustered()
3724 btrfs_return_cluster_to_free_space(NULL, last_ptr); in find_free_extent_clustered()
3725 spin_unlock(&last_ptr->refill_lock); in find_free_extent_clustered()
3737 struct btrfs_free_cluster *last_ptr = ffe_ctl->last_ptr; in find_free_extent_unclustered() local
3745 if (unlikely(last_ptr)) { in find_free_extent_unclustered()
3746 spin_lock(&last_ptr->lock); in find_free_extent_unclustered()
3747 last_ptr->fragmented = 1; in find_free_extent_unclustered()
3748 spin_unlock(&last_ptr->lock); in find_free_extent_unclustered()
3800 if (ffe_ctl->last_ptr && ffe_ctl->use_cluster) { in do_allocation_clustered()
3843 struct btrfs_free_cluster *last_ptr = ffe_ctl->last_ptr; in found_extent_clustered() local
3845 if (!ffe_ctl->use_cluster && last_ptr) { in found_extent_clustered()
3846 spin_lock(&last_ptr->lock); in found_extent_clustered()
3847 last_ptr->window_start = ins->objectid; in found_extent_clustered()
3848 spin_unlock(&last_ptr->lock); in found_extent_clustered()
4010 ffe_ctl->last_ptr = fetch_cluster_info(fs_info, space_info, in prepare_allocation_clustered()
4012 if (ffe_ctl->last_ptr) { in prepare_allocation_clustered()
4013 struct btrfs_free_cluster *last_ptr = ffe_ctl->last_ptr; in prepare_allocation_clustered() local
4015 spin_lock(&last_ptr->lock); in prepare_allocation_clustered()
4016 if (last_ptr->block_group) in prepare_allocation_clustered()
4017 ffe_ctl->hint_byte = last_ptr->window_start; in prepare_allocation_clustered()
4018 if (last_ptr->fragmented) { in prepare_allocation_clustered()
4024 ffe_ctl->hint_byte = last_ptr->window_start; in prepare_allocation_clustered()
4027 spin_unlock(&last_ptr->lock); in prepare_allocation_clustered()
4102 ffe_ctl.last_ptr = NULL; in find_free_extent()