qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH V10 08/17] block: move qmp_query_block() and bdr


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH V10 08/17] block: move qmp_query_block() and bdrv_query_info() to block/qapi.c
Date: Fri, 29 Mar 2013 14:10:07 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130311 Thunderbird/17.0.4

On 03/22/2013 08:19 AM, Wenchao Xia wrote:
>   This is a code move patch, except in qmp_query_block bdrv_next(bs)
> is used instead of direct traverse of global array 'bdrv_states'.

Mixing code motion and a code change isn't always the best, but at least
you were honest about it.  I don't know how easy it would be to split
this into two patches for straight code motion.

>   This patch also fix code style error reported by check script.
> 
> Signed-off-by: Wenchao Xia <address@hidden>
> ---
>  block.c               |   76 ------------------------------------------------
>  block/qapi.c          |   77 
> +++++++++++++++++++++++++++++++++++++++++++++++++
>  include/block/block.h |    1 -
>  include/block/qapi.h  |    1 +
>  4 files changed, 78 insertions(+), 77 deletions(-)

At any rate,

Reviewed-by: Eric Blake <address@hidden>

> -BlockInfoList *qmp_query_block(Error **errp)
> -{
> -    BlockInfoList *head = NULL, **p_next = &head;
> -    BlockDriverState *bs;
> -
> -    QTAILQ_FOREACH(bs, &bdrv_states, list) {

> +BlockInfoList *qmp_query_block(Error **errp)
> +{
> +    BlockInfoList *head = NULL, **p_next = &head;
> +    BlockDriverState *bs = NULL;
> +
> +    while ((bs = bdrv_next(bs))) {

This is the tweak you made.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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