Commit 09ec6b69 authored by Michael S. Tsirkin's avatar Michael S. Tsirkin Committed by Rusty Russell

virtio_blk: use virtqueue_xxx wrappers

Switch virtio_blk to new virtqueue_xxx wrappers.
Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
parent 505b0451
...@@ -50,7 +50,7 @@ static void blk_done(struct virtqueue *vq) ...@@ -50,7 +50,7 @@ static void blk_done(struct virtqueue *vq)
unsigned long flags; unsigned long flags;
spin_lock_irqsave(&vblk->lock, flags); spin_lock_irqsave(&vblk->lock, flags);
while ((vbr = vblk->vq->vq_ops->get_buf(vblk->vq, &len)) != NULL) { while ((vbr = virtqueue_get_buf(vblk->vq, &len)) != NULL) {
int error; int error;
switch (vbr->status) { switch (vbr->status) {
...@@ -158,7 +158,7 @@ static bool do_req(struct request_queue *q, struct virtio_blk *vblk, ...@@ -158,7 +158,7 @@ static bool do_req(struct request_queue *q, struct virtio_blk *vblk,
} }
} }
if (vblk->vq->vq_ops->add_buf(vblk->vq, vblk->sg, out, in, vbr) < 0) { if (virtqueue_add_buf(vblk->vq, vblk->sg, out, in, vbr) < 0) {
mempool_free(vbr, vblk->pool); mempool_free(vbr, vblk->pool);
return false; return false;
} }
...@@ -187,7 +187,7 @@ static void do_virtblk_request(struct request_queue *q) ...@@ -187,7 +187,7 @@ static void do_virtblk_request(struct request_queue *q)
} }
if (issued) if (issued)
vblk->vq->vq_ops->kick(vblk->vq); virtqueue_kick(vblk->vq);
} }
static void virtblk_prepare_flush(struct request_queue *q, struct request *req) static void virtblk_prepare_flush(struct request_queue *q, struct request *req)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment