- 06 2月, 2013 14 次提交
-
-
由 Daniel P. Berrange 提交于
-
由 Daniel P. Berrange 提交于
Annotate the fields in virQEMUDriverPtr to indicate the locking rules for their use Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
Currently the activePciHostdevs, inactivePciHostdevsd and activeUsbHostdevs lists are all implicitly protected by the QEMU driver lock. Now that the lists all inherit from the virObjectLockable, we can make the locking explicit, removing the dependency on the QEMU driver lock for correctness. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
To allow modifications to the lists to be synchronized, convert virPCIDeviceList and virUSBDeviceList into virObjectLockable classes. The locking, however, will not be self-contained. The users of these classes will have to call virObjectLock/Unlock in the critical regions. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
Rename all the usbDeviceXXX and usbXXXDevice APIs to have a fixed virUSBDevice name prefix
-
由 Daniel P. Berrange 提交于
When iterating over USB host devices to setup cgroups, the usbDevice object was leaked in both LXC and QEMU driers Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
Rename all the pciDeviceXXX and pciXXXDevice APIs to have a fixed virPCIDevice name prefix
-
由 Daniel P. Berrange 提交于
The QEMU driver struct has a 'qemuVersion' field that was previously used to cache the version lookup from capabilities. With the recent QEMU capabilities rewrite the caching happens at a lower level so this field is pointless. Removing it avoids worries about locking when updating it. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
Use atomic ops to increment nextvmid and encapsulate it in a method to prevent accidental non-atomic access
-
由 Daniel P. Berrange 提交于
Switch virDomainObjList to inherit from virObjectLockable and make all the APIs acquire/release the mutex when running. This makes virDomainObjList completely self-locking and no longer reliant on the hypervisor driver locks
-
由 Daniel P. Berrange 提交于
The duplicate VM checking should be done atomically with virDomainObjListAdd, so shoud not be a separate function. Instead just use flags to indicate what kind of checks are required. This pair, used in virDomainCreateXML: if (virDomainObjListIsDuplicate(privconn->domains, def, 1) < 0) goto cleanup; if (!(dom = virDomainObjListAdd(privconn->domains, privconn->caps, def, false))) goto cleanup; Changes to if (!(dom = virDomainObjListAdd(privconn->domains, privconn->caps, def, VIR_DOMAIN_OBJ_LIST_ADD_CHECK_LIVE, NULL))) goto cleanup; This pair, used in virDomainRestoreFlags: if (virDomainObjListIsDuplicate(privconn->domains, def, 1) < 0) goto cleanup; if (!(dom = virDomainObjListAdd(privconn->domains, privconn->caps, def, true))) goto cleanup; Changes to if (!(dom = virDomainObjListAdd(privconn->domains, privconn->caps, def, VIR_DOMAIN_OBJ_LIST_ADD_LIVE | VIR_DOMAIN_OBJ_LIST_ADD_CHECK_LIVE, NULL))) goto cleanup; This pair, used in virDomainDefineXML: if (virDomainObjListIsDuplicate(privconn->domains, def, 0) < 0) goto cleanup; if (!(dom = virDomainObjListAdd(privconn->domains, privconn->caps, def, false))) goto cleanup; Changes to if (!(dom = virDomainObjListAdd(privconn->domains, privconn->caps, def, 0, NULL))) goto cleanup;
-
由 Daniel P. Berrange 提交于
The virt-dbus.m4 check for DBus was preserving $LIBS before modifying it. Except it wasn't. It was preserving another copy of $CFLAGS. The result was that after the check completed, $LIBS got polluted with $CFLAGS Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Eric Blake 提交于
Commit 39c77fe5 triggered random failures, depending on the platform and what other fds leak into the testsuite (for me, it passed on RHEL 6 but failed on Fedora 18). The reason was that we were expecting an fd that fell outside of our reserved range. By reserving a larger range, the test once again passes on all platforms. * tests/commandtest.c (mymain): Reserve enough fds.
-
由 Eric Blake 提交于
Otherwise, we get a lot of scary (but harmless) noise in the logs: 2013-02-05 15:35:48.555+0000: 8637: error : qemuMonitorJSONCheckError:353 : internal error unable to execute QEMU command 'add-fd': Parameter 'fdset-id' expects an existing fdset-id one for every qemu 1.2 binary that we probe. * src/qemu/qemu_monitor_json.c (qemuMonitorJSONAddFd): During probe, avoid logging failures.
-
- 05 2月, 2013 16 次提交
-
-
由 John Ferlan 提交于
-
由 Daniel P. Berrange 提交于
As a step towards making virDomainObjList thread-safe turn it into an opaque virObject, preventing any direct access to its internals. As part of this a new method virDomainObjListForEach is introduced to replace all existing usage of virHashForEach
-
由 Daniel P. Berrange 提交于
The APIs names for accessing the domain list object are very inconsistent. Rename them all to have a standard virDomainObjList prefix.
-
由 Daniel P. Berrange 提交于
Currently the virQEMUDriverPtr struct contains an wide variety of data with varying access needs. Move all the static config data into a dedicated virQEMUDriverConfigPtr object. The only locking requirement is to hold the driver lock, while obtaining an instance of virQEMUDriverConfigPtr. Once a reference is held on the config object, it can be used completely lockless since it is immutable. NB, not all APIs correctly hold the driver lock while getting a reference to the config object in this patch. This is safe for now since the config is never updated on the fly. Later patches will address this fully. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
The previous change to the generator, changed too much - only the functions are in 'virerror.c', the constants remained in 'virerror.h' which could not be renamed for API compat reasons. Add a test case to sanity check the generated python bindings Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Michal Privoznik 提交于
If a compression binary prints something to stderr, currently it is discarded. However, it can contain useful data from debugging POV, so we should catch it.
-
由 Michal Privoznik 提交于
If a decompression binary prints something to stderr, currently it is discarded. However, it can contain useful data from debugging POV, so we should catch it.
-
由 Michal Privoznik 提交于
Commit 34e8f63a introduced support for catching errors from libvirt iohelper. However, at those times there wasn't such fancy API as virCommandDoAsyncIO(), so everything has to be implemented on our own. But since we do have the API now, we can use it and drop our implementation then.
-
由 Michal Privoznik 提交于
This is just a basic test, so we don't break virCommand in the future. A "Hello world\n" string is written to commanhelper, which copies input to stdout and stderr where we read it from. Then the read strings are compared with expected values.
-
由 Michal Privoznik 提交于
This is just preparing environment for the next patch, which is going to need an event loop.
-
由 Michal Privoznik 提交于
Currently, if we want to feed stdin, or catch stdout or stderr of a virCommand we have to use virCommandRun(). When using virCommandRunAsync() we have to register FD handles by hand. This may lead to code duplication. Hence, introduce an internal API, which does this automatically within virCommandRunAsync(). The intended usage looks like this: virCommandPtr cmd = virCommandNew*(...); char *buf = NULL; ... virCommandSetOutputBuffer(cmd, &buf); virCommandDoAsyncIO(cmd); if (virCommandRunAsync(cmd, NULL) < 0) goto cleanup; ... if (virCommandWait(cmd, NULL) < 0) goto cleanup; /* @buf now contains @cmd's stdout */ VIR_DEBUG("STDOUT: %s", NULLSTR(buf)); ... cleanup: VIR_FREE(buf); virCommandFree(cmd); Note, that both stdout and stderr buffers may change until virCommandWait() returns.
-
由 Peter Krempa 提交于
With this change it's easy to spot a forgotten free if a new device class is added.
-
由 Jiri Denemark 提交于
libvirt.c calls curl_global_init() if WITH_CURL is defined and thus it should be linked with libcurl. This fixes link failure in case neither xenapi nor esx driver is enabled (they are the only users of libcurl).
-
由 Jiri Denemark 提交于
When a changelog entry references an RPM macro, % needs to be escaped so that it does not appear expanded in package changelog. Fri Mar 4 2009 is incorrect since Mar 4 was Wednesday. Since libvirt-0.6.1 was released on Mar 4 2009, we should change Fri to Wed.
-
由 Martin Kletzander 提交于
QEMU is fully capable of handling VDI images and we just refuse to work with them. As qemu-img knows and supports this, there should be no problem with this addition. This is of course, just basic functionality, without searching for any backing files, etc.
-
由 Martin Kletzander 提交于
Some files have the magic shifted to some offset other than 0, so we have to support that. I also cleaned up some lines to be more readable and added missing magic for iso file format.
-
- 04 2月, 2013 10 次提交
-
-
由 Peter Krempa 提交于
This patch switches string option retrieval to vshCommandOptStringReq and refactors some error paths to avoid an unlikely memory leak of a secret object in cmdSecretSetValue.
-
由 Peter Krempa 提交于
-
由 Peter Krempa 提交于
also avoids potential NULL pointer dereference: $ virsh snapshot-current asdf "" error: invalid snapshotname argument '(null)' by removing the error message in favor of vshCommandOptStringReq
-
由 Peter Krempa 提交于
This patch simplifies error paths and switches to use vshCommandOptStringReq for argument retrieval in cmdSnapshotDumpXML
-
由 Peter Krempa 提交于
This patch adds some empty lines to separate blocks of code, cleans up unnecessary error message constructs in cmdNodeDeviceDetach, cmdNodeDeviceReAttach, cmdNodeDeviceReset and refactors error paths in cmdNodeDeviceDumpXML.
-
由 Peter Krempa 提交于
-
由 Peter Krempa 提交于
-
由 Peter Krempa 提交于
-
由 Peter Krempa 提交于
-
由 Peter Krempa 提交于
-