From: Wenchao Xia <xiawenc@linux.vnet.ibm.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: kwolf@redhat.com, stefanha@gmail.com, aliguori@us.ibm.com,
qemu-devel@nongnu.org, blauwirbel@gmail.com
Subject: Re: [Qemu-devel] [PATCH V12 6/7] libqblock API implement
Date: Thu, 29 Nov 2012 14:25:09 +0800 [thread overview]
Message-ID: <50B6FFC5.1080401@linux.vnet.ibm.com> (raw)
In-Reply-To: <50B5D690.6010909@redhat.com>
于 2012-11-28 17:17, Paolo Bonzini 写道:
> Almost there...
>
> Il 28/11/2012 09:55, Wenchao Xia ha scritto:
>> +/* This file was only used in libqblock, codes are copied from main-loop.c,
>> + iohandler.c, compatfd.c now, it may have different implemention in the future.
>> +*/
>
> No need for this comment.
>
will remove.
>> +
>> +/* Signal fd support, original codes are from compatfd.c */
>> +
>> bool qemu_signalfd_available(void)
>> {
>> return false;
>
> I think this stub can instead be placed in stubs/.
>
OK.
>> +int qb_image_new(QBlockContext *context,
>> + QBlockImage **p_qbi)
>> +{
>> + *p_qbi = g_malloc0_n(1, sizeof(QBlockImage));
>> + (*p_qbi)->bdrvs = bdrv_new("hda");
>> + if ((*p_qbi)->bdrvs == NULL) {
>> + QB_FREE(*p_qbi);
>> + set_context_err(context, QB_ERR_INTERNAL_ERR,
>> + "failed to create the driver.");
>> + return context->err_ret;
>> + }
>> + return 0;
>> +}
>
> The first reference should already be provided by qb_image_new.
>
OK.
>>
>> +__attribute__((constructor))
>> +static void libqblock_init(void)
>> +{
>> + /* Todo: add an assertion about the ABI. */
>> + if (libqb_global_data.init_flag == 0) {
>> + libqblock_runtime_init();
>> + libqb_global_data.init_flag = 1;
>> + }
>> +}
>
>
> How can this be called with libqb_global_data.init_flag == 1?
>
OK, I will remove the if, but keep init_flag which can show
library is already initialized.
--
Best Regards
Wenchao Xia
next prev parent reply other threads:[~2012-11-29 6:26 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-28 8:55 [Qemu-devel] [PATCH V12 0/7] libqblock qemu block layer library Wenchao Xia
2012-11-28 8:55 ` [Qemu-devel] [PATCH V12 1/7] Build system clean tests directory clearly Wenchao Xia
2012-11-28 8:55 ` [Qemu-devel] [PATCH V12 2/7] block export function path_has_protocol Wenchao Xia
2012-11-28 8:55 ` [Qemu-devel] [PATCH V12 3/7] stubs add function qemu_set_fd_handler Wenchao Xia
2012-11-28 8:55 ` [Qemu-devel] [PATCH V12 4/7] libqblock build system Wenchao Xia
2012-11-28 9:26 ` Paolo Bonzini
2012-11-29 6:28 ` Wenchao Xia
2012-11-28 8:55 ` [Qemu-devel] [PATCH V12 5/7] libqblock API design and type defines Wenchao Xia
2012-11-28 8:55 ` [Qemu-devel] [PATCH V12 6/7] libqblock API implement Wenchao Xia
2012-11-28 9:17 ` Paolo Bonzini
2012-11-29 6:25 ` Wenchao Xia [this message]
2012-11-29 8:47 ` Paolo Bonzini
2012-11-28 8:55 ` [Qemu-devel] [PATCH V12 7/7] libqblock test example Wenchao Xia
2012-11-28 9:17 ` Paolo Bonzini
2012-11-29 6:27 ` 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=50B6FFC5.1080401@linux.vnet.ibm.com \
--to=xiawenc@linux.vnet.ibm.com \
--cc=aliguori@us.ibm.com \
--cc=blauwirbel@gmail.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).