Re: [Qemu-devel] [PATCH v2] Consolidate reads and writes in nbd block device into one common routine

2012-02-28 Thread Michael Tokarev
On 28.02.2012 17:03, Paolo Bonzini wrote: > Il 28/02/2012 13:35, Michael Tokarev ha scritto: >> On 28.02.2012 15:35, Paolo Bonzini wrote: >>> Il 28/02/2012 11:24, Michael Tokarev ha scritto: This removes quite some duplicated code. >> [] +static int nbd_co_rwv(BlockDriverState *bs, int64_

Re: [Qemu-devel] [PATCH v2] Consolidate reads and writes in nbd block device into one common routine

2012-02-28 Thread Paolo Bonzini
Il 28/02/2012 13:35, Michael Tokarev ha scritto: > On 28.02.2012 15:35, Paolo Bonzini wrote: >> Il 28/02/2012 11:24, Michael Tokarev ha scritto: >>> This removes quite some duplicated code. > [] >>> +static int nbd_co_rwv(BlockDriverState *bs, int64_t sector_num, >>> + int nb_s

Re: [Qemu-devel] [PATCH v2] Consolidate reads and writes in nbd block device into one common routine

2012-02-28 Thread Michael Tokarev
On 28.02.2012 15:35, Paolo Bonzini wrote: > Il 28/02/2012 11:24, Michael Tokarev ha scritto: >> This removes quite some duplicated code. [] >> +static int nbd_co_rwv(BlockDriverState *bs, int64_t sector_num, >> + int nb_sectors, QEMUIOVector *qiov, int iswrite) > > Call this n

Re: [Qemu-devel] [PATCH v2] Consolidate reads and writes in nbd block device into one common routine

2012-02-28 Thread Paolo Bonzini
Il 28/02/2012 11:24, Michael Tokarev ha scritto: > This removes quite some duplicated code. > > v2 fixes a bug (uninitialized reply.error) and makes the loop more natural. > > Signed-off-By: Michael Tokarev > --- > block/nbd.c | 95 +++--- >

[Qemu-devel] [PATCH v2] Consolidate reads and writes in nbd block device into one common routine

2012-02-28 Thread Michael Tokarev
This removes quite some duplicated code. v2 fixes a bug (uninitialized reply.error) and makes the loop more natural. Signed-off-By: Michael Tokarev --- block/nbd.c | 95 +++--- 1 files changed, 31 insertions(+), 64 deletions(-) diff --git a