[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCHv2 6/7] cleanup qemu_co_sendv(), qemu_co_recvv()
From: |
Michael Tokarev |
Subject: |
Re: [Qemu-devel] [PATCHv2 6/7] cleanup qemu_co_sendv(), qemu_co_recvv() and friends |
Date: |
Mon, 12 Mar 2012 20:29:00 +0400 |
User-agent: |
Mozilla/5.0 (X11; Linux i686 on x86_64; rv:8.0) Gecko/20120216 Icedove/8.0 |
On 12.03.2012 17:30, Paolo Bonzini wrote:
> Il 11/03/2012 16:26, Michael Tokarev ha scritto:
>> Note that - I still hope - in the end there will be no sendv or
>> recv calls at all, only common sendv_recvv with is_write passed
>> as an argument from upper layer. It will be easier to remove
>> that #define - just two lines of code instead of minimum 5 :)
>
> This is what I don't really like in the second part of these patches.
> You are doing changes for the sake of other changes which are not
> upstream yet, for which there is no clear vision, and for which there is
> no clear benefit.
I already posted the example of this. I can complete whole thing
and send it all in one huge chunk if you prefer that :)
> While I agree that there is a lot of duplicated code in block.c and
> block/*, I don't think that what we need is more parameters to the
> functions. We have places where we need to know the request flags, for
> example, but the methods are already quite unwieldy and have a lot of
> arguments. So I'm not sure that this kind of unification buys anything.
Which places are these?
Also, how about dropping nr_sectors?
If you need flags, well, the extra argument being
added can really be used for that if necessary.
> On top of this, your patches unify things that are similar but not quite
> identical, and you do not provide hints in the commit messages that you
> did so. For example, qemu_co_recvv has handling for receiving 0, but
> qemu_co_sendv does not.
This is a bug, which I dind't notice, it shouldn't
be there. Somehow I overlooked this difference, but
I really wondered how they're differ! By using common
code here it becomes much more obvious (whith the bug
actually fixed).
I'll take a look at other similar things here and
in my block layer changes.
> Can you please separate the changes to make the argument order uniform?
> Those should be easy to get in.
While at it I found another "library", iov.[ch], which
has another implementation of the same thing. So that's
where it all should have been started.
I'll resend a v3 covering iov_* functions too.
Thank you!
/mjt
- Re: [Qemu-devel] [PATCHv2 5/7] Export qemu_sendv_recvv() and use it in qemu_sendv() and qemu_recvv(), (continued)
- [Qemu-devel] [PATCHv2 1/7] Consolidate qemu_iovec_memset{, _skip}() into single, simplified function, Michael Tokarev, 2012/03/10
- [Qemu-devel] [PATCHv2 2/7] allow qemu_iovec_from_buffer() to specify offset from which to start copying, Michael Tokarev, 2012/03/10
- [Qemu-devel] [PATCHv2 7/7] rewrite and comment qemu_sendv_recvv(), Michael Tokarev, 2012/03/10
- [Qemu-devel] [PATCHv2 4/7] change prototypes of qemu_sendv() and qemu_recvv(), Michael Tokarev, 2012/03/10
- [Qemu-devel] [PATCHv2 6/7] cleanup qemu_co_sendv(), qemu_co_recvv() and friends, Michael Tokarev, 2012/03/10
- Re: [Qemu-devel] [PATCHv2 6/7] cleanup qemu_co_sendv(), qemu_co_recvv() and friends, Paolo Bonzini, 2012/03/11
- Re: [Qemu-devel] [PATCHv2 6/7] cleanup qemu_co_sendv(), qemu_co_recvv() and friends, Michael Tokarev, 2012/03/11
- Re: [Qemu-devel] [PATCHv2 6/7] cleanup qemu_co_sendv(), qemu_co_recvv() and friends, Paolo Bonzini, 2012/03/12
- Re: [Qemu-devel] [PATCHv2 6/7] cleanup qemu_co_sendv(), qemu_co_recvv() and friends,
Michael Tokarev <=
- Re: [Qemu-devel] [PATCHv2 6/7] cleanup qemu_co_sendv(), qemu_co_recvv() and friends, Paolo Bonzini, 2012/03/12
[Qemu-devel] [PATCHv2 3/7] consolidate qemu_iovec_copy() and qemu_iovec_concat() and make them consistent, Michael Tokarev, 2012/03/10
Re: [Qemu-devel] [PATCHv2 0/7] cleanup/consolidate some iovec functions, Michael Tokarev, 2012/03/10
Re: [Qemu-devel] [PATCHv2 0/7] cleanup/consolidate some iovec functions, Paolo Bonzini, 2012/03/11