qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Wenchao Xia <xiawenc@linux.vnet.ibm.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: kwolf@redhat.com, aliguori@us.ibm.com, stefanha@gmail.com,
	qemu-devel@nongnu.org, blauwirbel@gmail.com, eblake@redhat.com
Subject: Re: [Qemu-devel] [PATCH V4 2/5] libqblock type defines
Date: Fri, 28 Sep 2012 18:52:55 +0800	[thread overview]
Message-ID: <50658187.5000402@linux.vnet.ibm.com> (raw)
In-Reply-To: <5065571C.3030505@redhat.com>

于 2012-9-28 15:51, Paolo Bonzini 写道:
> Il 28/09/2012 05:00, Wenchao Xia ha scritto:
>>>
>>>
>>> uint64_t qblock_get_virt_size(QBlockFmtInfo *fmt);
>>> QBlockProtInfo *qblock_get_backing_loc(QBlockFmtInfo *fmt);
>>> bool qblock_get_encrypt(QBlockFmtInfo *fmt);
>>>
>>> etc. that include the switch statement.
>>>
>>    I think it is reasonable use generic accessors instead of embbed
>> structure, maybe an additional helper function should be added as:
>>
>> QBlockStaticInfoAddr *qblock_get_static_info_addr(QBlockStaticInfo
>>   *info)
>>
>>    In this way only one switch statement is needed in source code,
>> and only one new API is added.
>
> No problem for the implementation, but please make this function static.
>
> Paolo
>
   Do you mean declaring it as static function? I think user may need
call it to get information so it need to be public.



-- 
Best Regards

Wenchao Xia

  reply	other threads:[~2012-09-28 10:54 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-27  2:23 [Qemu-devel] [PATCH V4 0/5] libqblock qemu block layer library Wenchao Xia
2012-09-27  2:23 ` [Qemu-devel] [PATCH V4 1/5] libqblock build system Wenchao Xia
2012-09-27  8:06   ` Paolo Bonzini
2012-09-27  9:39     ` Wenchao Xia
2012-09-27  2:23 ` [Qemu-devel] [PATCH V4 2/5] libqblock type defines Wenchao Xia
2012-09-27  8:25   ` Paolo Bonzini
2012-09-27  9:52     ` Wenchao Xia
2012-09-27 10:16       ` Paolo Bonzini
2012-09-28  3:00         ` Wenchao Xia
2012-09-28  7:51           ` Paolo Bonzini
2012-09-28 10:52             ` Wenchao Xia [this message]
2012-09-28 10:58               ` Paolo Bonzini
2012-09-27  2:24 ` [Qemu-devel] [PATCH V4 3/5] libqblock API Wenchao Xia
2012-09-27  2:24 ` [Qemu-devel] [PATCH V4 4/5] libqblock test build system Wenchao Xia
2012-09-27  8:30   ` Paolo Bonzini
2012-09-27  9:56     ` Wenchao Xia
2012-09-27 10:17       ` Paolo Bonzini
2012-09-28  3:04         ` Wenchao Xia
2012-09-28  7:52           ` Paolo Bonzini
2012-09-28  9:46             ` Wenchao Xia
2012-09-27  2:24 ` [Qemu-devel] [PATCH V4 5/5] libqblock test example Wenchao Xia

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=50658187.5000402@linux.vnet.ibm.com \
    --to=xiawenc@linux.vnet.ibm.com \
    --cc=aliguori@us.ibm.com \
    --cc=blauwirbel@gmail.com \
    --cc=eblake@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@gmail.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).