From: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: aliguori@us.ibm.com, Wenchao Xia <xiawenc@linux.vnet.ibm.com>,
qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] [RFC] libqblock draft code v1
Date: Thu, 2 Aug 2012 11:23:29 +0100 [thread overview]
Message-ID: <20120802102329.GC27056@stefanha-thinkpad.localdomain> (raw)
In-Reply-To: <501A4168.5040906@redhat.com>
On Thu, Aug 02, 2012 at 10:59:20AM +0200, Paolo Bonzini wrote:
> Il 02/08/2012 09:57, Wenchao Xia ha scritto:
> >>> +int qbi_init(struct QBlockInfo *info)
> >>
> >> Should return void.
> >>
> > yes, it is useless now, but maybe in future it may fail. Returning
> > int for every API results in only one more "eax store", I hope I can
> > keep all API returns indicate success/fail, while add comments to say
> > which API would not fail now.
>
> The question is *how* can it fail? It's a memset, do you envision it
> becoming something else?
>
> It's not about the performance of the processor, it's about the
> performance of whoever has to read the documentation and will wonder
> what the return code is for.
>
> (Though I proposed getting rid of this function too).
Yes, please. Drop _init()/_uninit() and do this in _open()/_close().
I'm also not sure why qb_create() needs a QBlockState* argument. Can it
be dropped?
Stefan
next prev parent reply other threads:[~2012-08-02 10:23 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-01 9:09 [Qemu-devel] [PATCH] [RFC] libqblock draft code v1 Wenchao Xia
2012-08-01 10:44 ` Paolo Bonzini
2012-08-02 7:57 ` Wenchao Xia
2012-08-02 8:59 ` Paolo Bonzini
2012-08-02 10:23 ` Stefan Hajnoczi [this message]
2012-08-01 12:49 ` Stefan Hajnoczi
2012-08-01 13:25 ` Eric Blake
2012-08-02 10:18 ` Stefan Hajnoczi
2012-08-02 11:11 ` Daniel P. Berrange
2012-08-02 11:13 ` Paolo Bonzini
2012-08-03 7:54 ` Wenchao Xia
2012-08-02 8:18 ` Wenchao Xia
2012-08-02 10:17 ` Stefan Hajnoczi
2012-08-02 11:08 ` Paolo Bonzini
2012-08-01 18:04 ` Blue Swirl
2012-08-02 8:32 ` Wenchao Xia
2012-08-02 9:00 ` Paolo Bonzini
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=20120802102329.GC27056@stefanha-thinkpad.localdomain \
--to=stefanha@linux.vnet.ibm.com \
--cc=aliguori@us.ibm.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=xiawenc@linux.vnet.ibm.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).