[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 10/10] nbd: Minimal structured read for clien
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH v2 10/10] nbd: Minimal structured read for client |
Date: |
Tue, 10 Oct 2017 17:00:46 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 |
On 10/10/2017 16:55, Vladimir Sementsov-Ogievskiy wrote:
> Hmm, would it be simpler just pass a function pointer, which should be
> called on each loop iteration?
> So, we will return to one common func nbd_co_receive_reply, but with two
> additional parameters: func and opaque?
Function pointers typically result in having to pass the state around in
a structure, for all the callers.
An iterator also has to package the state in a structure, but it is only
done once.
So function pointers would be simpler in the beginning, but would not
scale as well.
Paolo
- [Qemu-devel] [PATCH v2 07/10] nbd/client: refactor nbd_receive_starttls, (continued)
- [Qemu-devel] [PATCH v2 07/10] nbd/client: refactor nbd_receive_starttls, Vladimir Sementsov-Ogievskiy, 2017/10/09
- [Qemu-devel] [PATCH v2 02/10] block/nbd-client: refactor nbd_co_receive_reply, Vladimir Sementsov-Ogievskiy, 2017/10/09
- [Qemu-devel] [PATCH v2 01/10] block/nbd-client: assert qiov len once in nbd_co_request, Vladimir Sementsov-Ogievskiy, 2017/10/09
- [Qemu-devel] [PATCH v2 05/10] nbd: header constants indenting, Vladimir Sementsov-Ogievskiy, 2017/10/09
- [Qemu-devel] [PATCH v2 3/7] block/nbd-client: refactor reading reply, Vladimir Sementsov-Ogievskiy, 2017/10/09
- [Qemu-devel] [PATCH v2 10/10] nbd: Minimal structured read for client, Vladimir Sementsov-Ogievskiy, 2017/10/09
- Re: [Qemu-devel] [PATCH v2 10/10] nbd: Minimal structured read for client, Vladimir Sementsov-Ogievskiy, 2017/10/11
- Re: [Qemu-devel] [PATCH v2 10/10] nbd: Minimal structured read for client, Vladimir Sementsov-Ogievskiy, 2017/10/10
Re: [Qemu-devel] [PATCH v2 00/10] nbd minimal structured read, Vladimir Sementsov-Ogievskiy, 2017/10/09