Lines Matching defs:last_ptr
3669 struct btrfs_free_cluster *last_ptr = ffe_ctl->last_ptr;
3674 cluster_bg = btrfs_lock_cluster(bg, last_ptr, ffe_ctl->delalloc);
3682 offset = btrfs_alloc_from_cluster(cluster_bg, last_ptr,
3687 spin_unlock(&last_ptr->refill_lock);
3693 WARN_ON(last_ptr->block_group != cluster_bg);
3708 spin_unlock(&last_ptr->refill_lock);
3714 btrfs_return_cluster_to_free_space(NULL, last_ptr);
3721 spin_unlock(&last_ptr->refill_lock);
3728 ret = btrfs_find_space_cluster(bg, last_ptr, ffe_ctl->search_start,
3732 offset = btrfs_alloc_from_cluster(bg, last_ptr,
3737 spin_unlock(&last_ptr->refill_lock);
3748 btrfs_return_cluster_to_free_space(NULL, last_ptr);
3749 spin_unlock(&last_ptr->refill_lock);
3760 struct btrfs_free_cluster *last_ptr = ffe_ctl->last_ptr;
3768 if (unlikely(last_ptr)) {
3769 spin_lock(&last_ptr->lock);
3770 last_ptr->fragmented = 1;
3771 spin_unlock(&last_ptr->lock);
3806 if (ffe_ctl->last_ptr && ffe_ctl->use_cluster) {
4046 struct btrfs_free_cluster *last_ptr = ffe_ctl->last_ptr;
4048 if (!ffe_ctl->use_cluster && last_ptr) {
4049 spin_lock(&last_ptr->lock);
4050 last_ptr->window_start = ins->objectid;
4051 spin_unlock(&last_ptr->lock);
4264 ffe_ctl->last_ptr = fetch_cluster_info(fs_info, space_info,
4266 if (ffe_ctl->last_ptr) {
4267 struct btrfs_free_cluster *last_ptr = ffe_ctl->last_ptr;
4269 spin_lock(&last_ptr->lock);
4270 if (last_ptr->block_group)
4271 ffe_ctl->hint_byte = last_ptr->window_start;
4272 if (last_ptr->fragmented) {
4278 ffe_ctl->hint_byte = last_ptr->window_start;
4281 spin_unlock(&last_ptr->lock);
4382 ffe_ctl->last_ptr = NULL;