qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v3 2/4] luks: implement .bdrv_measure()


From: Stefan Hajnoczi
Subject: Re: [PATCH v3 2/4] luks: implement .bdrv_measure()
Date: Fri, 21 Feb 2020 11:18:02 +0000

On Wed, Feb 19, 2020 at 04:46:34PM +0100, Max Reitz wrote:
> On 11.02.20 17:03, Stefan Hajnoczi wrote:
> > Add qemu-img measure support in the "luks" block driver.
> > 
> > Signed-off-by: Stefan Hajnoczi <address@hidden>
> > ---
> >  block/crypto.c | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++
> >  1 file changed, 62 insertions(+)
> > 
> > diff --git a/block/crypto.c b/block/crypto.c
> > index 24823835c1..453119875e 100644
> > --- a/block/crypto.c
> > +++ b/block/crypto.c
> > @@ -484,6 +484,67 @@ static int64_t block_crypto_getlength(BlockDriverState 
> > *bs)
> 
> [...]
> 
> > +    cryptoopts = qemu_opts_to_qdict_filtered(opts, NULL,
> > +            &block_crypto_create_opts_luks, true);
> > +    qdict_put_str(cryptoopts, "format", "luks");
> > +    create_opts = block_crypto_create_opts_init(cryptoopts, errp);
> 
> It looks a bit weird to me to use errp here...
> 
> > +    qobject_unref(cryptoopts);
> > +    if (!create_opts) {
> > +        goto err;
> > +    }
> > +
> > +    if (!qcrypto_block_calculate_payload_offset(create_opts, NULL,
> > +                                                &luks_payload_size,
> > +                                                &local_err)) {
> 
> ...and local_err here.  Either works, but consistent style would be a
> bit nicer.
> 
> But not more correct, so:
> 
> Reviewed-by: Max Reitz <address@hidden>

Thanks, will fix!

Stefan

Attachment: signature.asc
Description: PGP signature


reply via email to

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