Message ID | 20170713110237.6712-6-lprosek@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Thu, 13 Jul 2017 13:02:34 +0200 Ladi Prosek <lprosek@redhat.com> wrote: > virtqueue_error includes queue index in the error output and is preferred > for errors that pertain to a virtqueue rather than to the device as a whole. > > Signed-off-by: Ladi Prosek <lprosek@redhat.com> > --- > hw/block/virtio-blk.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) Reviewed-by: Cornelia Huck <cohuck@redhat.com>
On Thu, Jul 13, 2017 at 01:02:34PM +0200, Ladi Prosek wrote: > virtqueue_error includes queue index in the error output and is preferred > for errors that pertain to a virtqueue rather than to the device as a whole. > > Signed-off-by: Ladi Prosek <lprosek@redhat.com> > --- > hw/block/virtio-blk.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c index c0bd247..e82d2a3 100644 --- a/hw/block/virtio-blk.c +++ b/hw/block/virtio-blk.c @@ -490,20 +490,20 @@ static int virtio_blk_handle_request(VirtIOBlockReq *req, MultiReqBuffer *mrb) VirtIODevice *vdev = VIRTIO_DEVICE(s); if (req->elem.out_num < 1 || req->elem.in_num < 1) { - virtio_error(vdev, "virtio-blk missing headers"); + virtqueue_error(req->vq, "virtio-blk missing headers"); return -1; } if (unlikely(iov_to_buf(iov, out_num, 0, &req->out, sizeof(req->out)) != sizeof(req->out))) { - virtio_error(vdev, "virtio-blk request outhdr too short"); + virtqueue_error(req->vq, "virtio-blk request outhdr too short"); return -1; } iov_discard_front(&iov, &out_num, sizeof(req->out)); if (in_iov[in_num - 1].iov_len < sizeof(struct virtio_blk_inhdr)) { - virtio_error(vdev, "virtio-blk request inhdr too short"); + virtqueue_error(req->vq, "virtio-blk request inhdr too short"); return -1; }
virtqueue_error includes queue index in the error output and is preferred for errors that pertain to a virtqueue rather than to the device as a whole. Signed-off-by: Ladi Prosek <lprosek@redhat.com> --- hw/block/virtio-blk.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)