qemu-block
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2 07/11] block: add x-blockdev-amend qmp comman


From: Markus Armbruster
Subject: Re: [Qemu-devel] [PATCH v2 07/11] block: add x-blockdev-amend qmp command
Date: Mon, 07 Oct 2019 09:53:50 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux)

Maxim Levitsky <address@hidden> writes:

> Signed-off-by: Maxim Levitsky <address@hidden>
> ---
[...]
> diff --git a/qapi/block-core.json b/qapi/block-core.json
> index e6edd641f1..7900914506 100644
> --- a/qapi/block-core.json
> +++ b/qapi/block-core.json
> @@ -4650,6 +4650,32 @@
>    'data': { 'job-id': 'str',
>              'options': 'BlockdevCreateOptions' } }
>  
> +##
> +# @x-blockdev-amend:
> +#
> +# Starts a job to amend format specific options of an existing open block 
> device.
> +# The job is automatically finalized, but a manual job-dismiss is required.
> +#
> +# @job-id:          Identifier for the newly created job.
> +#
> +# @node-name:       Name of the block node to work on
> +#
> +# @options:         Options (same as for image creation)
> +#
> +# @force:           Allow unsafe operations, format specific
> +#                   For luks that allows erase of the last active keyslot
> +#                   (permanent loss of data),
> +#                   and replacement of an active keyslot
> +#                   (possible loss of data if IO error happens)
> +#
> +# Since: 4.2
> +##
> +{ 'command': 'x-blockdev-amend',
> +  'data': { 'job-id': 'str',
> +            'node-name': 'str',
> +            'options': 'BlockdevCreateOptions',
> +            '*force': 'bool' } }
> +
>  ##
>  # @blockdev-open-tray:
>  #
> diff --git a/qapi/job.json b/qapi/job.json
> index a121b615fb..342d29a7aa 100644
> --- a/qapi/job.json
> +++ b/qapi/job.json
> @@ -19,10 +19,12 @@
>  #
>  # @create: image creation job type, see "blockdev-create" (since 3.0)
>  #
> +# @amend: image options amend job type, see "x-blockdev-amend" (since 4.2)
> +#
>  # Since: 1.7
>  ##
>  { 'enum': 'JobType',
> -  'data': ['commit', 'stream', 'mirror', 'backup', 'create'] }
> +  'data': ['commit', 'stream', 'mirror', 'backup', 'create', 'amend'] }
>  
>  ##
>  # @JobStatus:

Aha, you introduce "amend" after using the concept in PATCH 02.
Rather confusing, I'm afraid.

I guess secret deletion makes sense with amend somehow, and only with
amend.  If yes, the QAPI documentaion should spell that out, and the
code should diagnose invalid use (maybe it does already; I haven't
looked at it).



reply via email to

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