[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 08/11] block/crypto: implement blockdev-amend
From: |
Maxim Levitsky |
Subject: |
Re: [Qemu-devel] [PATCH v2 08/11] block/crypto: implement blockdev-amend |
Date: |
Fri, 08 Nov 2019 17:36:28 +0200 |
On Mon, 2019-10-07 at 09:58 +0200, Markus Armbruster wrote:
> Maxim Levitsky <address@hidden> writes:
>
> > Signed-off-by: Maxim Levitsky <address@hidden>
> > Reviewed-by: Daniel P. Berrangé <address@hidden>
> > ---
>
> [...]
> > diff --git a/qapi/block-core.json b/qapi/block-core.json
> > index 7900914506..4a6db98938 100644
> > --- a/qapi/block-core.json
> > +++ b/qapi/block-core.json
> > @@ -4211,8 +4211,11 @@
> > # Driver specific image creation options for LUKS.
> > #
> > # @file Node to create the image format on
> > +# Mandatory for create
> > # @size Size of the virtual disk in bytes
> > +# Mandatory for create
> > # @preallocation Preallocation mode for the new image
> > +# Only for create
> > # (since: 4.2)
> > # (default: off; allowed values: off, metadata, falloc,
> > full)
> > #
> > @@ -4220,8 +4223,8 @@
> > ##
> > { 'struct': 'BlockdevCreateOptionsLUKS',
> > 'base': 'QCryptoBlockCreateOptionsLUKS',
> > - 'data': { 'file': 'BlockdevRef',
> > - 'size': 'size',
> > + 'data': { '*file': 'BlockdevRef',
> > + '*size': 'size',
> > '*preallocation': 'PreallocMode' } }
> >
> > ##
>
> Why is this change needed?
>
> When the commit message says "implement FOO" and nothing else, then I
> don't expect QAPI schema changes. Working the answer to my question
> into the commit message might avoid the surprise.
It is because for the amend interface, it doesn't make much sense to pass the
size,
and the underlying block device.
Thats why I made these optional but I check that these parameters are present
on creation
and not present on amend.
Still I am more and more inclined to think that I should not use the create
options for amend,
but rather split into a new structure. This is just not worth it IMHO.
Best regards,
Maxim Levitsky
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [Qemu-devel] [PATCH v2 08/11] block/crypto: implement blockdev-amend,
Maxim Levitsky <=