From: Eric Blake <eblake@redhat.com>
To: Chunyan Liu <cyliu@suse.com>, qemu-devel@nongnu.org
Cc: stefanha@redhat.com
Subject: Re: [Qemu-devel] [PATCH V26 19/32] qcow2.c: replace QEMUOptionParameter with QemuOpts
Date: Thu, 01 May 2014 15:50:43 -0600 [thread overview]
Message-ID: <5362C1B3.7000704@redhat.com> (raw)
In-Reply-To: <1398762656-26079-20-git-send-email-cyliu@suse.com>
[-- Attachment #1: Type: text/plain, Size: 2970 bytes --]
On 04/29/2014 03:10 AM, Chunyan Liu wrote:
> Signed-off-by: Dong Xu Wang <wdongxu@linux.vnet.ibm.com>
> Signed-off-by: Chunyan Liu <cyliu@suse.com>
> ---
> block/qcow2.c | 265 +++++++++++++++++++++++++++-----------------------
> include/qemu/option.h | 1 +
> util/qemu-option.c | 2 +-
> 3 files changed, 143 insertions(+), 125 deletions(-)
>
> @@ -2375,10 +2392,10 @@ static BlockDriver bdrv_qcow2 = {
> .bdrv_open = qcow2_open,
> .bdrv_close = qcow2_close,
> .bdrv_reopen_prepare = qcow2_reopen_prepare,
> - .bdrv_create = qcow2_create,
> - .bdrv_has_zero_init = bdrv_has_zero_init_1,
> + .bdrv_create2 = qcow2_create,
> + .bdrv_has_zero_init = bdrv_has_zero_init_1,
> .bdrv_co_get_block_status = qcow2_co_get_block_status,
> - .bdrv_set_key = qcow2_set_key,
> + .bdrv_set_key = qcow2_set_key,
Looks odd to be re-indenting some, but not all, of the existing
elements, particularly when you aren't reindenting them to the same
depth. But as the indentation is already a mess here, you aren't making
it worse, so it doesn't impact my review.
> +++ b/include/qemu/option.h
> @@ -130,6 +130,7 @@ char *qemu_opt_get_del(QemuOpts *opts, const char *name);
> * Returns: true if @opts includes 'help' or equivalent.
> */
> bool qemu_opt_has_help_opt(QemuOpts *opts);
> +QemuOpt *qemu_opt_find(QemuOpts *opts, const char *name);
> bool qemu_opt_get_bool(QemuOpts *opts, const char *name, bool defval);
> uint64_t qemu_opt_get_number(QemuOpts *opts, const char *name, uint64_t defval);
> uint64_t qemu_opt_get_size(QemuOpts *opts, const char *name, uint64_t defval);
> diff --git a/util/qemu-option.c b/util/qemu-option.c
> index 2667e16..cb92b42 100644
> --- a/util/qemu-option.c
> +++ b/util/qemu-option.c
> @@ -568,7 +568,7 @@ void qemu_opts_print_help(QemuOptsList *list)
> }
> /* ------------------------------------------------------------------ */
>
> -static QemuOpt *qemu_opt_find(QemuOpts *opts, const char *name)
> +QemuOpt *qemu_opt_find(QemuOpts *opts, const char *name)
> {
I would have used a separate commit for exporting qemu_opt_find as a
non-static function. But I can live with it here, if it will get this
in the tree sooner.
Reviewed-by: Eric Blake <eblake@redhat.com>
But if you DO respin this series, then when you split the function
export into its own patch, please also consider adding documentation to
the function (undocumented static functions are generally okay, because
you already have the file open and can just read the function; but
undocumented exported functions risk a caller expecting one semantic,
but the implementation providing another, and the two getting out of
sync because there was nothing written to document what was expected).
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]
next prev parent reply other threads:[~2014-05-01 21:50 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1398762656-26079-1-git-send-email-cyliu@suse.com>
[not found] ` <1398762656-26079-14-git-send-email-cyliu@suse.com>
2014-05-01 19:18 ` [Qemu-devel] [PATCH V26 13/32] vvfat.c: handle cross_driver's create_options and create_opts Eric Blake
2014-05-01 19:22 ` Eric Blake
[not found] ` <1398762656-26079-16-git-send-email-cyliu@suse.com>
2014-05-01 19:25 ` [Qemu-devel] [PATCH V26 15/32] gluster.c: replace QEMUOptionParameter with QemuOpts Eric Blake
2014-05-06 13:18 ` Stefan Hajnoczi
[not found] ` <1398762656-26079-20-git-send-email-cyliu@suse.com>
2014-05-01 21:50 ` Eric Blake [this message]
[not found] ` <1398762656-26079-18-git-send-email-cyliu@suse.com>
2014-05-01 21:57 ` [Qemu-devel] [PATCH V26 17/32] nfs.c: " Eric Blake
2014-05-06 13:20 ` Stefan Hajnoczi
[not found] ` <1398762656-26079-13-git-send-email-cyliu@suse.com>
2014-05-01 22:14 ` [Qemu-devel] [PATCH V26 12/32] change block layer to support both QemuOpts and QEMUOptionParamter Leandro Dorileo
[not found] ` <5360587E.5050409@redhat.com>
2014-05-04 3:51 ` Chun Yan Liu
[not found] ` <1398762656-26079-21-git-send-email-cyliu@suse.com>
2014-05-05 23:08 ` [Qemu-devel] [PATCH V26 20/32] qed.c: replace QEMUOptionParameter with QemuOpts Eric Blake
2014-05-06 13:22 ` Stefan Hajnoczi
[not found] ` <1398762656-26079-3-git-send-email-cyliu@suse.com>
2014-05-06 13:14 ` [Qemu-devel] [PATCH V26 02/32] QemuOpts: add def_value_str to QemuOptDesc Stefan Hajnoczi
[not found] ` <1398762656-26079-4-git-send-email-cyliu@suse.com>
[not found] ` <535FD3B6.6020701@redhat.com>
2014-05-04 3:20 ` [Qemu-devel] [PATCH V26 03/32] QemuOpts: repurpose qemu_opts_print to replace print_option_parameters Chun Yan Liu
2014-05-06 13:14 ` Stefan Hajnoczi
[not found] ` <1398762656-26079-5-git-send-email-cyliu@suse.com>
2014-05-06 13:15 ` [Qemu-devel] [PATCH V26 04/32] qapi: output def_value_str when query command line options Stefan Hajnoczi
[not found] ` <1398762656-26079-28-git-send-email-cyliu@suse.com>
2014-05-06 13:24 ` [Qemu-devel] [PATCH V26 27/32] vdi.c: replace QEMUOptionParameter with QemuOpts Stefan Hajnoczi
2014-05-06 13:26 ` [Qemu-devel] [PATCH V26 00/32] " Stefan Hajnoczi
2014-05-19 3:02 ` Chun Yan Liu
2014-05-19 21:11 ` Leandro Dorileo
2014-06-03 5:34 ` Chun Yan Liu
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=5362C1B3.7000704@redhat.com \
--to=eblake@redhat.com \
--cc=cyliu@suse.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.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).