Re: [Qemu-devel] [PATCH v7 1/2] mirror: Rewrite mirror_iteration

2015-12-23 Thread Fam Zheng
On Thu, 12/24 01:21, Max Reitz wrote: > On 24.12.2015 01:15, Max Reitz wrote: > > On 23.12.2015 05:12, Fam Zheng wrote: > >> The "pnum < nb_sectors" condition in deciding whether to actually copy > >> data is unnecessarily strict, and the qiov initialization is > >> unnecessarily for bdrv_aio_write

Re: [Qemu-devel] [PATCH v7 1/2] mirror: Rewrite mirror_iteration

2015-12-23 Thread Max Reitz
On 24.12.2015 01:15, Max Reitz wrote: > On 23.12.2015 05:12, Fam Zheng wrote: >> The "pnum < nb_sectors" condition in deciding whether to actually copy >> data is unnecessarily strict, and the qiov initialization is >> unnecessarily for bdrv_aio_write_zeroes and bdrv_aio_discard. >> >> Rewrite mirr

Re: [Qemu-devel] [PATCH v7 1/2] mirror: Rewrite mirror_iteration

2015-12-23 Thread Max Reitz
On 23.12.2015 05:12, Fam Zheng wrote: > The "pnum < nb_sectors" condition in deciding whether to actually copy > data is unnecessarily strict, and the qiov initialization is > unnecessarily for bdrv_aio_write_zeroes and bdrv_aio_discard. > > Rewrite mirror_iteration to fix both flaws. > > Signed-

[Qemu-devel] [PATCH v7 1/2] mirror: Rewrite mirror_iteration

2015-12-22 Thread Fam Zheng
The "pnum < nb_sectors" condition in deciding whether to actually copy data is unnecessarily strict, and the qiov initialization is unnecessarily for bdrv_aio_write_zeroes and bdrv_aio_discard. Rewrite mirror_iteration to fix both flaws. Signed-off-by: Fam Zheng --- block/mirror.c | 308 +++