From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41435) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bCqDp-0007Iy-VL for qemu-devel@nongnu.org; Tue, 14 Jun 2016 11:25:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bCqDi-0003RZ-7X for qemu-devel@nongnu.org; Tue, 14 Jun 2016 11:25:44 -0400 Received: from mailhub.sw.ru ([195.214.232.25]:19148 helo=relay.sw.ru) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bCqDh-0003R2-LM for qemu-devel@nongnu.org; Tue, 14 Jun 2016 11:25:38 -0400 From: "Denis V. Lunev" Date: Tue, 14 Jun 2016 18:25:07 +0300 Message-Id: <1465917916-22348-1-git-send-email-den@openvz.org> Subject: [Qemu-devel] [PATCH 0/9] major rework of drive-mirror List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org, qemu-block@nongnu.org Cc: vsementsov@virtuozzo.com, "Denis V. Lunev" , Stefan Hajnoczi , Fam Zheng , Kevin Wolf , Max Reitz , Jeff Cody , Eric Blake Block commit of the active image to the backing store on a slow disk could never end. For example with the guest with the following loop inside while true; do dd bs=1k count=1 if=/dev/zero of=x done running above slow storage could not complete the operation with a resonable amount of time: virsh blockcommit rhel7 sda --active --shallow virsh qemu-monitor-event virsh qemu-monitor-command rhel7 \ '{"execute":"block-job-complete",\ "arguments":{"device":"drive-scsi0-0-0-0"} }' virsh qemu-monitor-event Completion event is never received. This problem could not be fixed easily with the current architecture. We should either prohibit guest writes (making dirty bitmap dirty) or switch to the sycnchronous scheme. This series switches driver mirror to synch scheme. Actually we can have something more intelligent and switch to sync mirroring just after the first pass over the bitmap. Though this could be done relatively easily during discussion. The most difficult things are here. The set also adds some performance improvements dealing with known-to-be-zero areas. Signed-off-by: Denis V. Lunev Reviewed-by: Vladimir Sementsov-Ogievskiy CC: Stefan Hajnoczi CC: Fam Zheng CC: Kevin Wolf CC: Max Reitz CC: Jeff Cody CC: Eric Blake Denis V. Lunev (9): mirror: fix calling of blk_aio_pwritev/blk_aio_preadv mirror: create mirror_dirty_init helper for mirror_run mirror: optimize dirty bitmap filling in mirror_run a bit mirror: efficiently zero out target mirror: improve performance of mirroring of empty disk block: pass qiov into before_write notifier mirror: allow to save buffer for QEMUIOVector in MirrorOp mirror: use synch scheme for drive mirror mirror: replace bdrv_dirty_bitmap with plain hbitmap block/io.c | 12 +- block/mirror.c | 290 +++++++++++++++++++++++++++++++++++----------- include/block/block_int.h | 1 + 3 files changed, 229 insertions(+), 74 deletions(-) -- 2.5.0