Lines Matching refs:req_data
16 struct virtio_pmem_request *req_data, *req_buf; in virtio_pmem_host_ack() local
21 while ((req_data = virtqueue_get_buf(vq, &len)) != NULL) { in virtio_pmem_host_ack()
22 req_data->done = true; in virtio_pmem_host_ack()
23 wake_up(&req_data->host_acked); in virtio_pmem_host_ack()
42 struct virtio_pmem_request *req_data; in virtio_pmem_flush() local
57 req_data = kmalloc(sizeof(*req_data), GFP_KERNEL); in virtio_pmem_flush()
58 if (!req_data) in virtio_pmem_flush()
61 req_data->done = false; in virtio_pmem_flush()
62 init_waitqueue_head(&req_data->host_acked); in virtio_pmem_flush()
63 init_waitqueue_head(&req_data->wq_buf); in virtio_pmem_flush()
64 INIT_LIST_HEAD(&req_data->list); in virtio_pmem_flush()
65 req_data->req.type = cpu_to_le32(VIRTIO_PMEM_REQ_TYPE_FLUSH); in virtio_pmem_flush()
66 sg_init_one(&sg, &req_data->req, sizeof(req_data->req)); in virtio_pmem_flush()
68 sg_init_one(&ret, &req_data->resp.ret, sizeof(req_data->resp)); in virtio_pmem_flush()
78 while ((err = virtqueue_add_sgs(vpmem->req_vq, sgs, 1, 1, req_data, in virtio_pmem_flush()
82 req_data->wq_buf_avail = false; in virtio_pmem_flush()
83 list_add_tail(&req_data->list, &vpmem->req_list); in virtio_pmem_flush()
87 wait_event(req_data->wq_buf, req_data->wq_buf_avail); in virtio_pmem_flush()
101 wait_event(req_data->host_acked, req_data->done); in virtio_pmem_flush()
102 err = le32_to_cpu(req_data->resp.ret); in virtio_pmem_flush()
105 kfree(req_data); in virtio_pmem_flush()