Lines Matching refs:vdo

26 	struct vdo *vdo;  member
117 vdo_initialize_completion(&flush->completion, flusher->vdo, in allocate_flush()
135 int vdo_make_flusher(struct vdo *vdo) in vdo_make_flusher() argument
137 int result = vdo_allocate(1, struct flusher, __func__, &vdo->flusher); in vdo_make_flusher()
142 vdo->flusher->vdo = vdo; in vdo_make_flusher()
143 vdo->flusher->thread_id = vdo->thread_config.packer_thread; in vdo_make_flusher()
144 vdo_set_admin_state_code(&vdo->flusher->state, VDO_ADMIN_STATE_NORMAL_OPERATION); in vdo_make_flusher()
145 vdo_initialize_completion(&vdo->flusher->completion, vdo, in vdo_make_flusher()
148 spin_lock_init(&vdo->flusher->lock); in vdo_make_flusher()
149 bio_list_init(&vdo->flusher->waiting_flush_bios); in vdo_make_flusher()
150 vdo->flusher->flush_pool = mempool_create(1, allocate_flush, free_flush, in vdo_make_flusher()
151 vdo->flusher); in vdo_make_flusher()
152 return ((vdo->flusher->flush_pool == NULL) ? -ENOMEM : VDO_SUCCESS); in vdo_make_flusher()
216 vdo_increment_packer_flush_generation(flusher->vdo->packer); in flush_packer_callback()
255 flusher->logical_zone_to_notify = &flusher->vdo->logical_zones->zones[0]; in notify_flush()
270 struct flusher *flusher = completion->vdo->flusher; in flush_vdo()
278 vdo_enter_read_only_mode(flusher->vdo, result); in flush_vdo()
321 for (zone = &flusher->vdo->logical_zones->zones[0]; zone != NULL; zone = zone->next) in vdo_complete_flushes()
369 static void initialize_flush(struct vdo_flush *flush, struct vdo *vdo) in initialize_flush() argument
372 bio_list_merge_init(&flush->bios, &vdo->flusher->waiting_flush_bios); in initialize_flush()
380 completion->vdo->thread_config.packer_thread, NULL); in launch_flush()
392 void vdo_launch_flush(struct vdo *vdo, struct bio *bio) in vdo_launch_flush() argument
398 struct vdo_flush *flush = mempool_alloc(vdo->flusher->flush_pool, GFP_NOWAIT); in vdo_launch_flush()
399 struct flusher *flusher = vdo->flusher; in vdo_launch_flush()
416 initialize_flush(flush, vdo); in vdo_launch_flush()
434 struct flusher *flusher = flush->completion.vdo->flusher; in release_flush()
441 initialize_flush(flush, flusher->vdo); in release_flush()
463 struct vdo *vdo = completion->vdo; in vdo_complete_flush_callback() local
471 vdo_count_bios(&vdo->stats.bios_acknowledged, bio); in vdo_complete_flush_callback()
474 bio_set_dev(bio, vdo_get_backing_device(vdo)); in vdo_complete_flush_callback()
475 atomic64_inc(&vdo->stats.flush_out); in vdo_complete_flush_callback()
493 struct vdo *vdo = flusher->vdo; in select_bio_queue() local
494 zone_count_t bio_threads = flusher->vdo->thread_config.bio_thread_count; in select_bio_queue()
498 return vdo->thread_config.bio_threads[0]; in select_bio_queue()
500 interval = vdo->device_config->thread_counts.bio_rotation_interval; in select_bio_queue()
508 return vdo->thread_config.bio_threads[flusher->bio_queue_rotor]; in select_bio_queue()
521 select_bio_queue(completion->vdo->flusher), NULL); in vdo_complete_flush()