[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 4/9] virtio-blk: handle virtio_blk_handle_req
From: |
Cornelia Huck |
Subject: |
Re: [Qemu-devel] [PATCH v2 4/9] virtio-blk: handle virtio_blk_handle_request() errors |
Date: |
Thu, 22 Sep 2016 15:44:44 +0200 |
On Wed, 21 Sep 2016 18:57:20 +0200
Greg Kurz <address@hidden> wrote:
> All these errors are caused by a buggy guest: let's switch the device to
> the broken state instead of terminating QEMU.
>
> Signed-off-by: Greg Kurz <address@hidden>
> ---
> v2: - added a out_err: label in virtio_blk_handle_vq()
> ---
> hw/block/virtio-blk.c | 28 ++++++++++++++++++----------
> 1 file changed, 18 insertions(+), 10 deletions(-)
>
> @@ -586,13 +589,16 @@ void virtio_blk_handle_vq(VirtIOBlock *s, VirtQueue *vq)
> blk_io_plug(s->blk);
>
> while ((req = virtio_blk_get_request(s, vq))) {
> - virtio_blk_handle_request(req, &mrb);
> + if (virtio_blk_handle_request(req, &mrb)) {
> + goto out_err;
> + }
> }
>
> if (mrb.num_reqs) {
> virtio_blk_submit_multireq(s->blk, &mrb);
> }
>
> +out_err:
I would probably have called that label out_unplug instead, but still
Reviewed-by: Cornelia Huck <address@hidden>
> blk_io_unplug(s->blk);
> }
>
- Re: [Qemu-devel] [PATCH v2 1/9] virtio-9p: add parentheses to sizeof operator, (continued)
- [Qemu-devel] [PATCH v2 2/9] virtio-blk: turn virtio_blk_handle_request() into a static function, Greg Kurz, 2016/09/21
- [Qemu-devel] [PATCH v2 3/9] virtio-9p: handle handle_9p_output() error, Greg Kurz, 2016/09/21
- [Qemu-devel] [PATCH v2 4/9] virtio-blk: handle virtio_blk_handle_request() errors, Greg Kurz, 2016/09/21
- [Qemu-devel] [PATCH v2 5/9] virtio-net: handle virtio_net_handle_ctrl() error, Greg Kurz, 2016/09/21
- [Qemu-devel] [PATCH v2 7/9] virtio-net: handle virtio_net_flush_tx() errors, Greg Kurz, 2016/09/21
- [Qemu-devel] [PATCH v2 8/9] virtio-scsi: convert virtio_scsi_bad_req() to use virtio_error(), Greg Kurz, 2016/09/21
- [Qemu-devel] [PATCH v2 6/9] virtio-net: handle virtio_net_receive() errors, Greg Kurz, 2016/09/21
- [Qemu-devel] [PATCH v2 9/9] virtio-scsi: handle virtio_scsi_set_config() error, Greg Kurz, 2016/09/21