[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] scsi-block: Add qdev error properties
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH] scsi-block: Add qdev error properties |
Date: |
Thu, 17 Aug 2017 13:44:59 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 |
On 17/08/2017 12:28, Fam Zheng wrote:
> This makes the werror/rerror options available on the scsi-block device,
> to allow user specify error handling policy in the same way as scsi-hd
> etc.
>
> Signed-off-by: Fam Zheng <address@hidden>
I'm not sure this is enough, because you would only obey the
rerror/werror action if ioctl fails, not if the ioctl succeeds but the
command fails (the "r->status && *r->status" conditional in
scsi_disk_req_check_error).
Paolo
> ---
> hw/scsi/scsi-disk.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/hw/scsi/scsi-disk.c b/hw/scsi/scsi-disk.c
> index 5f1e5e8070..27d917f7c3 100644
> --- a/hw/scsi/scsi-disk.c
> +++ b/hw/scsi/scsi-disk.c
> @@ -2972,6 +2972,7 @@ static const TypeInfo scsi_cd_info = {
>
> #ifdef __linux__
> static Property scsi_block_properties[] = {
> + DEFINE_BLOCK_ERROR_PROPERTIES(SCSIDiskState, qdev.conf), \
> DEFINE_PROP_DRIVE("drive", SCSIDiskState, qdev.conf.blk),
> DEFINE_PROP_END_OF_LIST(),
> };
>