提交 8316982a 编写于 作者: K Kiyoshi Ueda 提交者: Jens Axboe

virtio_blk: change to use __blk_end_request()

This patch converts virtio_blk to use __blk_end_request() directly
so that end_{queued|dequeued}_request() can be removed.
Related 'uptodate' argument is converted to 'error'.
Signed-off-by: NKiyoshi Ueda <k-ueda@ct.jp.nec.com>
Signed-off-by: NJun'ichi Nomura <j-nomura@ce.jp.nec.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
上级 0497b345
......@@ -47,20 +47,20 @@ static void blk_done(struct virtqueue *vq)
spin_lock_irqsave(&vblk->lock, flags);
while ((vbr = vblk->vq->vq_ops->get_buf(vblk->vq, &len)) != NULL) {
int uptodate;
int error;
switch (vbr->status) {
case VIRTIO_BLK_S_OK:
uptodate = 1;
error = 0;
break;
case VIRTIO_BLK_S_UNSUPP:
uptodate = -ENOTTY;
error = -ENOTTY;
break;
default:
uptodate = 0;
error = -EIO;
break;
}
end_dequeued_request(vbr->req, uptodate);
__blk_end_request(vbr->req, error, blk_rq_bytes(vbr->req));
list_del(&vbr->list);
mempool_free(vbr, vblk->pool);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册