示例#1
0
void
vdev_queue_fini(vdev_t *vd)
{
	vdev_queue_t *vq = &vd->vdev_queue;
	vdev_io_t *vi;

	avl_destroy(&vq->vq_deadline_tree);
	avl_destroy(&vq->vq_read_tree);
	avl_destroy(&vq->vq_write_tree);
	avl_destroy(&vq->vq_pending_tree);

	while ((vi = list_head(&vq->vq_io_list)) != NULL) {
		list_remove(&vq->vq_io_list, vi);
		zio_vdev_free(vi);
	}

	list_destroy(&vq->vq_io_list);

	mutex_destroy(&vq->vq_lock);
}
示例#2
0
文件: vdev_queue.c 项目: Lezval/zfs
void
vdev_queue_fini(vdev_t *vd)
{
	vdev_queue_t *vq = &vd->vdev_queue;
	vdev_io_t *vi;
	zio_priority_t p;

	for (p = 0; p < ZIO_PRIORITY_NUM_QUEUEABLE; p++)
		avl_destroy(&vq->vq_class[p].vqc_queued_tree);
	avl_destroy(&vq->vq_active_tree);

	while ((vi = list_head(&vq->vq_io_list)) != NULL) {
		list_remove(&vq->vq_io_list, vi);
		zio_vdev_free(vi);
	}

	list_destroy(&vq->vq_io_list);

	mutex_destroy(&vq->vq_lock);
}