On Tue, Dec 06, 2016 at 10:47:51AM +0800, xieyingtai(a)huawei.com wrote:
From: Yingtai Xie <xieyingtai(a)huawei.com>
virDomainGetBlockIoTune() will be called before setBlockIoTune, as a result,
it leads to a failure if set flags with VIR_DOMAIN_AFFECT_LIVE |
VIR_DOMAIN_AFFECT_CONFIG which is an reasonable option.
Signed-off-by: Yingtai Xie <xieyingtai(a)huawei.com>
---
libvirt-override.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/libvirt-override.c b/libvirt-override.c
index 2de95ce..caa52fb 100644
--- a/libvirt-override.c
+++ b/libvirt-override.c
@@ -4805,6 +4805,7 @@ libvirt_virDomainSetBlockIoTune(PyObject *self ATTRIBUTE_UNUSED,
Py_ssize_t size = 0;
const char *disk;
unsigned int flags;
+ unsigned int flags1 = 0;
This variable is totally pointless, please get rid of it and pass the literal
0 to the function as I asked for last time you posted this.
virTypedParameterPtr params = NULL, new_params = NULL;
if (!PyArg_ParseTuple(args, (char *)"OzOI:virDomainSetBlockIoTune",
@@ -4822,7 +4823,7 @@ libvirt_virDomainSetBlockIoTune(PyObject *self ATTRIBUTE_UNUSED,
}
LIBVIRT_BEGIN_ALLOW_THREADS;
- i_retval = virDomainGetBlockIoTune(domain, disk, NULL, &nparams, flags);
+ i_retval = virDomainGetBlockIoTune(domain, disk, NULL, &nparams, flags1);
LIBVIRT_END_ALLOW_THREADS;
if (i_retval < 0)
@@ -4838,7 +4839,7 @@ libvirt_virDomainSetBlockIoTune(PyObject *self ATTRIBUTE_UNUSED,
return PyErr_NoMemory();
LIBVIRT_BEGIN_ALLOW_THREADS;
- i_retval = virDomainGetBlockIoTune(domain, disk, params, &nparams, flags);
+ i_retval = virDomainGetBlockIoTune(domain, disk, params, &nparams, flags1);
LIBVIRT_END_ALLOW_THREADS;
if (i_retval < 0) {
--
1.8.3.1
Regards,
Daniel
--
|:
http://berrange.com -o-
http://www.flickr.com/photos/dberrange/ :|
|:
http://libvirt.org -o-
http://virt-manager.org :|
|:
http://entangle-photo.org -o-
http://search.cpan.org/~danberr/ :|