Lines Matching defs:last_ptr
4391 struct btrfs_free_cluster *last_ptr = NULL;
4421 last_ptr = &root->fs_info->meta_alloc_cluster;
4427 last_ptr = &root->fs_info->data_alloc_cluster;
4430 if (last_ptr) {
4431 spin_lock(&last_ptr->lock);
4432 if (last_ptr->block_group)
4433 hint_byte = last_ptr->window_start;
4434 spin_unlock(&last_ptr->lock);
4440 if (!last_ptr)
4539 if (last_ptr && loop < LOOP_NO_EMPTY_SIZE) {
4544 spin_lock(&last_ptr->refill_lock);
4545 if (last_ptr->block_group &&
4546 (last_ptr->block_group->ro ||
4547 !block_group_bits(last_ptr->block_group, data))) {
4552 offset = btrfs_alloc_from_cluster(block_group, last_ptr,
4556 spin_unlock(&last_ptr->refill_lock);
4560 spin_lock(&last_ptr->lock);
4566 if (!last_ptr_loop && last_ptr->block_group &&
4567 last_ptr->block_group != block_group) {
4570 block_group = last_ptr->block_group;
4572 spin_unlock(&last_ptr->lock);
4573 spin_unlock(&last_ptr->refill_lock);
4586 spin_unlock(&last_ptr->lock);
4592 btrfs_return_cluster_to_free_space(NULL, last_ptr);
4598 block_group, last_ptr,
4607 last_ptr, num_bytes,
4611 spin_unlock(&last_ptr->refill_lock);
4616 spin_unlock(&last_ptr->refill_lock);
4630 btrfs_return_cluster_to_free_space(NULL, last_ptr);
4631 spin_unlock(&last_ptr->refill_lock);