* Denis V. Lunev (d...@openvz.org) wrote: > 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.
Some random thoughts: a) People have been asking for post-copy for block storage, and this solves the same problem a different way. b) I guess the other way is to turn on write-throttling - that would also guarantee the rate at which writes happen. c) Don't you end up with something verymuch like what the colo block replication guys have ended up with? Dave > The set also adds some performance improvements dealing with > known-to-be-zero areas. > > Signed-off-by: Denis V. Lunev <d...@openvz.org> > Reviewed-by: Vladimir Sementsov-Ogievskiy<vsement...@virtuozzo.com> > CC: Stefan Hajnoczi <stefa...@redhat.com> > CC: Fam Zheng <f...@redhat.com> > CC: Kevin Wolf <kw...@redhat.com> > CC: Max Reitz <mre...@redhat.com> > CC: Jeff Cody <jc...@redhat.com> > CC: Eric Blake <ebl...@redhat.com> > > 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 > > -- Dr. David Alan Gilbert / dgilb...@redhat.com / Manchester, UK