Lines Matching refs:last_ptr

3490 	struct btrfs_free_cluster *last_ptr;  member
3549 struct btrfs_free_cluster *last_ptr = ffe_ctl->last_ptr; in find_free_extent_clustered() local
3554 cluster_bg = btrfs_lock_cluster(bg, last_ptr, ffe_ctl->delalloc); in find_free_extent_clustered()
3561 offset = btrfs_alloc_from_cluster(cluster_bg, last_ptr, in find_free_extent_clustered()
3566 spin_unlock(&last_ptr->refill_lock); in find_free_extent_clustered()
3573 WARN_ON(last_ptr->block_group != cluster_bg); in find_free_extent_clustered()
3588 spin_unlock(&last_ptr->refill_lock); in find_free_extent_clustered()
3594 btrfs_return_cluster_to_free_space(NULL, last_ptr); in find_free_extent_clustered()
3601 spin_unlock(&last_ptr->refill_lock); in find_free_extent_clustered()
3608 ret = btrfs_find_space_cluster(bg, last_ptr, ffe_ctl->search_start, in find_free_extent_clustered()
3612 offset = btrfs_alloc_from_cluster(bg, last_ptr, in find_free_extent_clustered()
3617 spin_unlock(&last_ptr->refill_lock); in find_free_extent_clustered()
3626 spin_unlock(&last_ptr->refill_lock); in find_free_extent_clustered()
3638 btrfs_return_cluster_to_free_space(NULL, last_ptr); in find_free_extent_clustered()
3639 spin_unlock(&last_ptr->refill_lock); in find_free_extent_clustered()
3651 struct btrfs_free_cluster *last_ptr = ffe_ctl->last_ptr; in find_free_extent_unclustered() local
3659 if (unlikely(last_ptr)) { in find_free_extent_unclustered()
3660 spin_lock(&last_ptr->lock); in find_free_extent_unclustered()
3661 last_ptr->fragmented = 1; in find_free_extent_unclustered()
3662 spin_unlock(&last_ptr->lock); in find_free_extent_unclustered()
3714 if (ffe_ctl->last_ptr && ffe_ctl->use_cluster) { in do_allocation_clustered()
3757 struct btrfs_free_cluster *last_ptr = ffe_ctl->last_ptr; in found_extent_clustered() local
3759 if (!ffe_ctl->use_cluster && last_ptr) { in found_extent_clustered()
3760 spin_lock(&last_ptr->lock); in found_extent_clustered()
3761 last_ptr->window_start = ins->objectid; in found_extent_clustered()
3762 spin_unlock(&last_ptr->lock); in found_extent_clustered()
3924 ffe_ctl->last_ptr = fetch_cluster_info(fs_info, space_info, in prepare_allocation_clustered()
3926 if (ffe_ctl->last_ptr) { in prepare_allocation_clustered()
3927 struct btrfs_free_cluster *last_ptr = ffe_ctl->last_ptr; in prepare_allocation_clustered() local
3929 spin_lock(&last_ptr->lock); in prepare_allocation_clustered()
3930 if (last_ptr->block_group) in prepare_allocation_clustered()
3931 ffe_ctl->hint_byte = last_ptr->window_start; in prepare_allocation_clustered()
3932 if (last_ptr->fragmented) { in prepare_allocation_clustered()
3938 ffe_ctl->hint_byte = last_ptr->window_start; in prepare_allocation_clustered()
3941 spin_unlock(&last_ptr->lock); in prepare_allocation_clustered()
4016 ffe_ctl.last_ptr = NULL; in find_free_extent()