On 06/03/2016 08:05 AM, Vladimir Sementsov-Ogievskiy wrote:
Add target-zeroed flag to allow user specify that target is already
zeroed. With this flag set zeroes which was in source before mirror
start will not be copyed.
With this flag set, any runs of zeroes in the source before the mirror
starts will not be copied.
Without this libvirt migration of empty disk takes too long time.
Signed-off-by: Vladimir Sementsov-Ogievskiy <address@hidden>
---
I've tested it with
time virsh migrate --live test qemu+ssh://other_node/system --copy-storage-all
Presumably with a libvirt patch to turn on the optional flag.
I'm not sure I like this patch. Libvirt uses NBD to implement
--copy-storage-all, I think we're better off improving NBD to
automatically handle sparse writes, than we are to add a one-off hack
that requires libvirt to change. That is, once NBD is smarter, the copy
will be faster without needing a tweak. And we ARE working on making
NBD smarter (one of my goals for the 2.7 release is to get all the
sparse file additions to NBD implemented)
That said, I'll still review it.