Re: [Qemu-devel] [PATCH V3] block/io: optimize bdrv_co_pwritev for small requests

2016-05-31 Thread Stefan Hajnoczi
On Mon, May 30, 2016 at 01:31:13PM +0200, Peter Lieven wrote: > in a read-modify-write cycle a small request might cause > head and tail to fall into the same aligned block. Currently > QEMU reads the same block twice in this case which is > not necessary. > > Signed-off-by: Peter Lieven > --- >

[Qemu-devel] [PATCH V3] block/io: optimize bdrv_co_pwritev for small requests

2016-05-30 Thread Peter Lieven
in a read-modify-write cycle a small request might cause head and tail to fall into the same aligned block. Currently QEMU reads the same block twice in this case which is not necessary. Signed-off-by: Peter Lieven --- v1->v2: following Paolos suggestions to simplify the if condition and