[libvirt] [PATCH] Fix bug on setting both weight and device-weights at the same time
Eric Blake
eblake at redhat.com
Wed Nov 30 19:11:41 UTC 2011
I'm adding 'virsh:' as the prefix to the subject, since this was only a
bug in virsh and not in the qemu driver handling.
On 11/30/2011 12:26 AM, Hu Tao wrote:
> When setting both blkio weight and device-weights at the same time, the weight
> is lost. Fix it.
> ---
> tools/virsh.c | 6 +++---
> 1 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/tools/virsh.c b/tools/virsh.c
> index 01da8e5..af9f538 100644
> --- a/tools/virsh.c
> +++ b/tools/virsh.c
> @@ -4788,14 +4788,14 @@ cmdBlkiotune(vshControl * ctl, const vshCmd * cmd)
> if (!virStrcpy(temp->field, VIR_DOMAIN_BLKIO_WEIGHT,
> sizeof(temp->field)))
> goto cleanup;
> - }
> -
> - if (device_weight) {
> + weight = 0;
> + } else if (device_weight) {
> temp->value.s = vshStrdup(ctl, device_weight);
> temp->type = VIR_TYPED_PARAM_STRING;
> if (!virStrcpy(temp->field, VIR_DOMAIN_BLKIO_DEVICE_WEIGHT,
> sizeof(temp->field)))
> goto cleanup;
> + device_weight = NULL;
ACK and pushed.
--
Eric Blake eblake at redhat.com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 620 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20111130/5eefe9bf/attachment-0001.sig>
More information about the libvir-list
mailing list