qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v5 1/9] qapi/block-core: Add retry option for error action


From: Stefan Hajnoczi
Subject: Re: [PATCH v5 1/9] qapi/block-core: Add retry option for error action
Date: Mon, 22 Feb 2021 17:22:43 +0000

On Fri, Feb 05, 2021 at 06:13:07PM +0800, Jiahui Cen wrote:
> Add a new error action 'retry' to support retry on errors.
> 
> Signed-off-by: Jiahui Cen <cenjiahui@huawei.com>
> Signed-off-by: Ying Fang <fangying1@huawei.com>
> ---
>  blockdev.c           | 2 ++
>  qapi/block-core.json | 9 +++++++--
>  2 files changed, 9 insertions(+), 2 deletions(-)
> 
> diff --git a/blockdev.c b/blockdev.c
> index b250b9b959..ece1d8ae58 100644
> --- a/blockdev.c
> +++ b/blockdev.c
> @@ -342,6 +342,8 @@ static int parse_block_error_action(const char *buf, bool 
> is_read, Error **errp)
>          return BLOCKDEV_ON_ERROR_STOP;
>      } else if (!strcmp(buf, "report")) {
>          return BLOCKDEV_ON_ERROR_REPORT;
> +    } else if (!strcmp(buf, "retry")) {
> +        return BLOCKDEV_ON_ERROR_RETRY;
>      } else {
>          error_setg(errp, "'%s' invalid %s error action",
>                     buf, is_read ? "read" : "write");
> diff --git a/qapi/block-core.json b/qapi/block-core.json
> index 9f555d5c1d..30ea43cb77 100644
> --- a/qapi/block-core.json
> +++ b/qapi/block-core.json
> @@ -1143,10 +1143,13 @@
>  #
>  # @auto: inherit the error handling policy of the backend (since: 2.7)
>  #
> +# @retry: for guest operations, retry the failing request; (since: 6.0)
> +#         for jobs, not supported

Does this mean block_job_error_action() can now reach abort() in switch
(on_err)? If yes, please add a check that reports an error when "retry"
is specified so that abort() cannot be reached.

Stefan

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]