[libvirt] [PATCH 5/9] qemu: blockjob: Split out update of persistent XML disk's source on mirror jobs

Eric Blake eblake at redhat.com
Wed Jul 24 22:11:52 UTC 2019


On 7/24/19 4:07 PM, Peter Krempa wrote:
> Both active block commit and block copy modify the disk source of the
> active definition and thus also must modify the corresponding inactive
> definition source so that the VM starts up later. This is currently
> implemented in the legacy block job handler but the logic will be ueful

useful

> also for the new handlers. Split it out which also simplifies it.
> 
> Signed-off-by: Peter Krempa <pkrempa at redhat.com>
> ---
>  src/qemu/qemu_blockjob.c | 64 ++++++++++++++++++++++++----------------
>  1 file changed, 39 insertions(+), 25 deletions(-)

More lines is simpler?
/me reads patch
Aha, the inflation is caused by doc comments; while the code itself
represents the same construct in fewer lines due to saner line wrapping :)

> 
> diff --git a/src/qemu/qemu_blockjob.c b/src/qemu/qemu_blockjob.c
> index a3109d3934..f9e79db131 100644
> --- a/src/qemu/qemu_blockjob.c
> +++ b/src/qemu/qemu_blockjob.c
> @@ -434,6 +434,44 @@ qemuBlockJobEmitEvents(virQEMUDriverPtr driver,
>  }
> 
> 
> +/**
> + * qemuBlockJobRewriteConfigDiskSource:
> + * @vm: domain object
> + * @disk: live definition disk
> + * @newsrc: new source which should be also considered for the new disk
> + *
> + * For block jobs which modify the running disk source it is required that we
> + * try our best to update the config XML's disk source as well in most cases.
> + *
> + * This helper finds the disk from the persistent definition corresponding to
> + * @disk and updates it's source to @newsrc.

its (remember, "it's" is okay only if "it is" can be substituted)

ACK

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20190724/2419a109/attachment-0001.sig>


More information about the libvir-list mailing list