qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] [RFC] libqblock draft code v1


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH] [RFC] libqblock draft code v1
Date: Thu, 2 Aug 2012 11:23:29 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

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




reply via email to

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