From: Kevin Wolf <kwolf@redhat.com>
To: Andrey Shinkevich <andrey.shinkevich@virtuozzo.com>
Cc: qemu-devel@nongnu.org, qemu-block@nongnu.org, eblake@redhat.com,
fam@euphon.net, armbru@redhat.com, mreitz@redhat.com,
jsnow@redhat.com, den@openvz.org, vsementsov@virtuozzo.com
Subject: Re: [Qemu-devel] [PATCH v11 1/3] bdrv_query_image_info Error parameter added
Date: Fri, 1 Feb 2019 18:13:40 +0100 [thread overview]
Message-ID: <20190201171340.GA31750@localhost.localdomain> (raw)
In-Reply-To: <1548942405-760115-2-git-send-email-andrey.shinkevich@virtuozzo.com>
Am 31.01.2019 um 14:46 hat Andrey Shinkevich geschrieben:
> Inform a user in case qcow2_get_specific_info fails to obtain
> QCOW2 image specific information. This patch is preliminary to
> the print of bitmap information in the 'qemu-img info' output.
>
> Signed-off-by: Andrey Shinkevich <andrey.shinkevich@virtuozzo.com>
> Reviewed-by: Eric Blake <eblake@redhat.com>
> diff --git a/block/crypto.c b/block/crypto.c
> index f0a5f6b..4ede833 100644
> --- a/block/crypto.c
> +++ b/block/crypto.c
> @@ -594,13 +594,13 @@ static int block_crypto_get_info_luks(BlockDriverState *bs,
> }
>
> static ImageInfoSpecific *
> -block_crypto_get_specific_info_luks(BlockDriverState *bs)
> +block_crypto_get_specific_info_luks(BlockDriverState *bs, Error **errp)
> {
> BlockCrypto *crypto = bs->opaque;
> ImageInfoSpecific *spec_info;
> QCryptoBlockInfo *info;
>
> - info = qcrypto_block_get_info(crypto->block, NULL);
> + info = qcrypto_block_get_info(crypto->block, errp);
> if (!info) {
> return NULL;
> }
In v9 of the series I suggested to have another patch to remove errp
from qcrypto_block_get_info() because it never returns errors anyway.
Don't you think that would be better? But it's your decision, I'm fine
with either way.
> diff --git a/block/qapi.c b/block/qapi.c
> index c66f949..f53f100 100644
> --- a/block/qapi.c
> +++ b/block/qapi.c
> @@ -282,7 +282,12 @@ void bdrv_query_image_info(BlockDriverState *bs,
> info->dirty_flag = bdi.is_dirty;
> info->has_dirty_flag = true;
> }
> - info->format_specific = bdrv_get_specific_info(bs);
> + info->format_specific = bdrv_get_specific_info(bs, &err);
The spacing looks odd now. I'd either keep the assignment for
info->has_format_specific above the if block so that both are aligned to
the same column, or remove the additional spaces.
With that fixed:
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
next prev parent reply other threads:[~2019-02-01 17:13 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-31 13:46 [Qemu-devel] [PATCH v11 0/3] qemu-img info lists bitmap directory entries Andrey Shinkevich
2019-01-31 13:46 ` [Qemu-devel] [PATCH v11 1/3] bdrv_query_image_info Error parameter added Andrey Shinkevich
2019-02-01 14:42 ` Vladimir Sementsov-Ogievskiy
2019-02-01 14:46 ` Daniel P. Berrangé
2019-02-01 17:13 ` Kevin Wolf [this message]
2019-01-31 13:46 ` [Qemu-devel] [PATCH v11 2/3] qemu-img info lists bitmap directory entries Andrey Shinkevich
2019-02-01 15:19 ` Vladimir Sementsov-Ogievskiy
2019-02-01 17:08 ` Eric Blake
2019-02-01 17:19 ` Kevin Wolf
2019-02-01 18:39 ` Markus Armbruster
2019-02-01 19:04 ` Eric Blake
2019-02-01 19:23 ` Markus Armbruster
2019-02-01 19:28 ` Eric Blake
2019-02-04 13:05 ` Markus Armbruster
2019-02-04 16:03 ` Vladimir Sementsov-Ogievskiy
2019-02-04 16:24 ` Eric Blake
2019-02-04 16:35 ` Vladimir Sementsov-Ogievskiy
2019-02-04 16:46 ` Vladimir Sementsov-Ogievskiy
2019-02-04 17:33 ` Eric Blake
2019-02-04 17:37 ` Eric Blake
2019-02-04 7:49 ` Vladimir Sementsov-Ogievskiy
2019-02-04 15:23 ` Eric Blake
2019-02-04 9:46 ` Kevin Wolf
2019-02-04 13:45 ` Markus Armbruster
2019-02-04 15:36 ` Vladimir Sementsov-Ogievskiy
2019-02-05 10:00 ` Kevin Wolf
2019-02-05 13:16 ` Vladimir Sementsov-Ogievskiy
2019-02-05 14:28 ` Kevin Wolf
2019-02-05 14:38 ` Eric Blake
2019-01-31 13:46 ` [Qemu-devel] [PATCH v11 3/3] qemu-img info: bitmaps extension new test 239 Andrey Shinkevich
2019-02-01 15:57 ` Vladimir Sementsov-Ogievskiy
2019-02-01 17:14 ` Kevin Wolf
2019-02-04 7:53 ` Vladimir Sementsov-Ogievskiy
2019-02-04 9:36 ` Kevin Wolf
2019-02-01 17:23 ` Eric Blake
2019-02-01 17:34 ` Kevin Wolf
2019-02-03 15:28 ` [Qemu-devel] [PATCH v11 0/3] qemu-img info lists bitmap directory entries no-reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190201171340.GA31750@localhost.localdomain \
--to=kwolf@redhat.com \
--cc=andrey.shinkevich@virtuozzo.com \
--cc=armbru@redhat.com \
--cc=den@openvz.org \
--cc=eblake@redhat.com \
--cc=fam@euphon.net \
--cc=jsnow@redhat.com \
--cc=mreitz@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=vsementsov@virtuozzo.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).