[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: |
Maxim Levitsky |
Subject: |
Re: [Qemu-devel] [PATCH v2 07/11] block: add x-blockdev-amend qmp command |
Date: |
Fri, 08 Nov 2019 17:38:46 +0200 |
On Mon, 2019-10-07 at 09:53 +0200, Markus Armbruster wrote:
> 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).
I think I did mentioned that in QAPI,
and I do check for optional arguments in the code.
I will probably stop using the blockdev-create options for amend after all.
Best regards,
Maxim Levitsky
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [Qemu-devel] [PATCH v2 07/11] block: add x-blockdev-amend qmp command,
Maxim Levitsky <=