[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 10/13] block: add generic infrastructure for x-blockdev-amend
From: |
Markus Armbruster |
Subject: |
Re: [PATCH 10/13] block: add generic infrastructure for x-blockdev-amend qmp command |
Date: |
Tue, 21 Jan 2020 08:59:18 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) |
Maxim Levitsky <address@hidden> writes:
> blockdev-amend will be used similiar to blockdev-create
> to allow on the fly changes of the structure of the format based block
> devices.
>
> Current plan is to first support encryption keyslot management for luks
> based formats (raw and embedded in qcow2)
>
> Signed-off-by: Maxim Levitsky <address@hidden>
[...]
> diff --git a/qapi/block-core.json b/qapi/block-core.json
> index 7ff5e5edaf..601f7dc9a4 100644
> --- a/qapi/block-core.json
> +++ b/qapi/block-core.json
> @@ -4743,6 +4743,48 @@
> 'data': { 'job-id': 'str',
> 'options': 'BlockdevCreateOptions' } }
>
> +##
> +# @BlockdevAmendOptions:
> +#
> +# Options for amending an image format
> +#
> +# @driver block driver that is suitable for the image
> +#
> +# Since: 5.0
> +##
> +{ 'union': 'BlockdevAmendOptions',
> + 'base': {
> + 'driver': 'BlockdevDriver' },
> + 'discriminator': 'driver',
> + 'data': {
> + } }
> +
> +##
> +# @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 (driver specific)
> +#
> +# @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)
PATCH 2 appears to reject that. What am I missing?
> +#
> +# Since: 5.0
> +##
> +{ 'command': 'x-blockdev-amend',
> + 'data': { 'job-id': 'str',
> + 'node-name': 'str',
> + 'options': 'BlockdevAmendOptions',
> + '*force': 'bool' } }
> +
> ##
> # @blockdev-open-tray:
> #
> diff --git a/qapi/job.json b/qapi/job.json
> index a121b615fb..362b634ec1 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 5.0)
> +#
> # Since: 1.7
> ##
> { 'enum': 'JobType',
> - 'data': ['commit', 'stream', 'mirror', 'backup', 'create'] }
> + 'data': ['commit', 'stream', 'mirror', 'backup', 'create', 'amend'] }
>
> ##
> # @JobStatus:
- Re: [PATCH 06/13] block/crypto: implement the encryption key management, (continued)
- [PATCH 07/13] qcow2: extend qemu-img amend interface with crypto options, Maxim Levitsky, 2020/01/14
- [PATCH 09/13] qemu-iotests: qemu-img tests for luks key management, Maxim Levitsky, 2020/01/14
- [PATCH 08/13] iotests: filter few more luks specific create options, Maxim Levitsky, 2020/01/14
- [PATCH 10/13] block: add generic infrastructure for x-blockdev-amend qmp command, Maxim Levitsky, 2020/01/14
- Re: [PATCH 10/13] block: add generic infrastructure for x-blockdev-amend qmp command,
Markus Armbruster <=
- [PATCH 12/13] block/qcow2: implement blockdev-amend, Maxim Levitsky, 2020/01/14
- [PATCH 13/13] iotests: add tests for blockdev-amend, Maxim Levitsky, 2020/01/14
- [PATCH 11/13] block/crypto: implement blockdev-amend, Maxim Levitsky, 2020/01/14
- Re: [PATCH 00/13] LUKS: encryption slot management using amend interface, no-reply, 2020/01/14
- Re: [PATCH 00/13] LUKS: encryption slot management using amend interface, no-reply, 2020/01/14