[libvirt] [PATCH 2/2] Use virDomainDiskByName where appropriate

Ján Tomko jtomko at redhat.com
Thu May 21 11:17:49 UTC 2015


On Thu, May 21, 2015 at 11:42:25AM +0200, Jiri Denemark wrote:
> Most virDomainDiskIndexByName callers do not care about the index; what
> they really want is a disk def pointer.
> 
> Signed-off-by: Jiri Denemark <jdenemar at redhat.com>
> ---
>  src/libxl/libxl_driver.c  |  4 +--
>  src/lxc/lxc_driver.c      | 10 +++-----
>  src/qemu/qemu_agent.c     |  9 ++++---
>  src/qemu/qemu_blockjob.c  |  5 ++--
>  src/qemu/qemu_driver.c    | 62 ++++++++++++++++++-----------------------------
>  src/qemu/qemu_migration.c |  6 ++---
>  src/qemu/qemu_process.c   | 23 ++++--------------
>  7 files changed, 42 insertions(+), 77 deletions(-)
> 

ACK series.

> @@ -18000,7 +17983,8 @@ qemuDomainSetBlockIoTune(virDomainPtr dom,
>  
>      if (flags & VIR_DOMAIN_AFFECT_CONFIG) {
>          sa_assert(persistentDef);

Can we get rid of this one now?

Jan

> -        oldinfo = &persistentDef->disks[conf_idx]->blkdeviotune;
> +        sa_assert(conf_disk);
> +        oldinfo = &conf_disk->blkdeviotune;
>          if (!set_bytes) {
>              info.total_bytes_sec = oldinfo->total_bytes_sec;
>              info.read_bytes_sec = oldinfo->read_bytes_sec;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20150521/df506c6f/attachment-0001.sig>


More information about the libvir-list mailing list