- 01 12月, 2011 19 次提交
-
-
由 Eric Blake 提交于
We have several directories that are created on the fly, and which only contain state relevant to a running libvirtd process (all located in /var/run). Since the directories are created as needed, and make no sense without a running libvirtd, we want them deleted if libvirt is uninstalled. And in F15 and newer, /var/run is on tmpfs (forcing us to recreate on the fly); which means that someone trying to verify a complete rpm will fail if the directory does not currently exist because libvirtd has not been started since boot. The solution, then, is to mark the directories as %ghost, so that rpm knows that we own them and will clean it up if libvirt is uninstalled, but will no longer create the directory for us at install, nor complain at verify time if the directory does not exist. See https://bugzilla.redhat.com/show_bug.cgi?id=656611. * libvirt.spec.in (%files): Add %ghost to temporary directories that we don't install, but want cleaned up on libvirt removal.
-
由 Jiri Denemark 提交于
Not only was ctl->quit accessed without a mutex but unfortunately, virEventAddTimeout only interrupts the poll when event loop is running so the hack needs to add a timeout that will make next poll return immediately without blocking.
-
由 Alex Jia 提交于
Detected by Coverity. Leak introduced in commit 90074ecf. Signed-off-by: NAlex Jia <ajia@redhat.com> Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Alex Jia 提交于
Detected by Coverity. Leak introduced in commit c1df2c14. Two bugs here: 1. memory leak on successful parse 2. failure to parse still returned success Signed-off-by: NAlex Jia <ajia@redhat.com> Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Alex Jia 提交于
Detected by Coverity. Leak introduced in commit 8866eed0. Two bugs here: 1. logfd wasn't closed on all return paths 2. if we failed to mark a domain autodestroy, then the domain was not made transient but we still returned success Signed-off-by: NAlex Jia <ajia@redhat.com> Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Alex Jia 提交于
Detected by Coverity. Leak introduced in commit 673adba5. Two separate bugs here: 1. call was not freed on all error paths 2. virCondDestroy was called even if virCondInit failed Signed-off-by: NAlex Jia <ajia@redhat.com> Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Alex Jia 提交于
Detected by Coverity. Leak introduced in commit 0873b688. Signed-off-by: NAlex Jia <ajia@redhat.com>
-
由 Alex Jia 提交于
Detected by Coverity. Leak introduced in commit 109efd79. Signed-off-by: NAlex Jia <ajia@redhat.com>
-
由 Prerna Saxena 提交于
To add support for running libvirt on PowerPC, a CPU driver for the PowerPC platform must be added. Most generic cpu driver routines such as CPU compare, decode, etc are based on CPUID comparison and are not relevant for non-x86 platforms. Here, we introduce stubs for relevant PowerPC routines invoked by libvirt. Signed-off-by: NPrerna Saxena <prerna@linux.vnet.ibm.com> Signed-off-by: NAnton Blanchard <anton@au.ibm.com>
-
由 Hu Tao 提交于
filter 0-device-weight when: - getting blkio parameters with --config - starting up a domain When testing with blkio, I found these issues: (dom is down) virsh blkiotune dom --device-weights /dev/sda,300,/dev/sdb,500 virsh blkiotune dom --device-weights /dev/sda,300,/dev/sdb,0 virsh blkiotune dom weight : 800 device_weight : /dev/sda,200,/dev/sdb,0 # issue 1: shows 0 device weight of /dev/sdb that may confuse user (continued) virsh start dom # issue 2: If /dev/sdb doesn't exist, libvirt refuses to bring the # dom up because it wants to set the device weight to 0 of a # non-existing device. Since 0 means no weight-limit, we really don't # have to set it.
-
由 Eric Blake 提交于
Prior to this patch, for a running dom, the commands: $ virsh blkiotune dom --device-weights /dev/sda,502,/dev/sdb,498 $ virsh blkiotune dom --device-weights /dev/sda,503 $ virsh blkiotune dom weight : 500 device_weight : /dev/sda,503 claim that /dev/sdb no longer has a non-default weight, but directly querying cgroups says otherwise: $ cat /cgroup/blkio/libvirt/qemu/dom/blkio.weight_device 8:0 503 8:16 498 After this patch, an explicit 0 is required to remove a device path from the XML, and omitting a device path that was previously specified leaves that device path untouched in the XML, to match cgroups behavior. * src/qemu/qemu_driver.c (parseBlkioWeightDeviceStr): Rename... (qemuDomainParseDeviceWeightStr): ...and use correct type. (qemuDomainSetBlkioParameters): After parsing string, modify rather than replacing existing table. * tools/virsh.pod (blkiotune): Tweak wording.
-
由 Eric Blake 提交于
The next patch will make it possible to have virDomainSetBlkioParameters leave device weights unchanged if they are not mentioned in the incoming string, but this only works if the list of block weights does not allow duplicate paths. Technically, a user can still confuse libvirt by passing alternate spellings that resolve to the same device, but it is not worth worrying about working around that kind of abuse. * src/conf/domain_conf.c (virDomainDefParseXML): Require unique paths.
-
由 Hu Tao 提交于
When setting both blkio weight and device-weights at the same time, the weight is lost. Fix it.
-
由 Lei Li 提交于
Signed-off-by: NLei Li <lilei@linux.vnet.ibm.com> Signed-off-by: NZhi Yong Wu <wuzhy@linux.vnet.ibm.com> Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Lei Li 提交于
Python support for both setting and getting block I/O throttle. Signed-off-by: NLei Li <lilei@linux.vnet.ibm.com> Signed-off-by: NZhi Yong Wu <wuzhy@linux.vnet.ibm.com> Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Lei Li 提交于
Support virsh command blkdeviotune. Can set or query a block disk I/O throttle setting. Signed-off-by: NLei Li <lilei@linux.vnet.ibm.com> Signed-off-by: NZhi Yong Wu <wuzhy@linux.vnet.ibm.com> Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Lei Li 提交于
Implement the block I/O throttle setting and getting support to qemu driver. Signed-off-by: NLei Li <lilei@linux.vnet.ibm.com> Signed-off-by: NZhi Yong Wu <wuzhy@linux.vnet.ibm.com> Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Lei Li 提交于
Enable block I/O throttle for per-disk in XML, as the first per-disk IO tuning parameter. Signed-off-by: NLei Li <lilei@linux.vnet.ibm.com> Signed-off-by: NZhi Yong Wu <wuzhy@linux.vnet.ibm.com> Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Lei Li 提交于
Support Block I/O Throttle setting and query to remote driver. Signed-off-by: NLei Li <lilei@linux.vnet.ibm.com> Signed-off-by: NZhi Yong Wu <wuzhy@linux.vnet.ibm.com> Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 30 11月, 2011 21 次提交
-
-
由 Daniel P. Berrange 提交于
* src/libvirt.c: Free user directory path
-
由 Daniel P. Berrange 提交于
The virTimestamp and virTimeMs functions in src/util/util.h duplicate functionality from virtime.h, in a non-async signal safe manner. Remove them, and convert all code over to the new APIs. * src/util/util.c, src/util/util.h: Delete virTimeMs and virTimestamp * src/lxc/lxc_driver.c, src/qemu/qemu_domain.c, src/qemu/qemu_driver.c, src/qemu/qemu_migration.c, src/qemu/qemu_process.c, src/util/event_poll.c: Convert to use virtime APIs
-
由 Daniel P. Berrange 提交于
Use the new virTimeStringNowRaw() API for generating log timestamps in an async signal safe manner * src/util/logging.c: Use virTimeStringNowRaw
-
由 Daniel P. Berrange 提交于
The logging APIs need to be able to generate formatted timestamps using only async signal safe functions. This rules out using gmtime/localtime/malloc/gettimeday(!) and much more. Introduce a new internal API which is async signal safe. virTimeMillisNowRaw replacement for gettimeofday. Uses clock_gettime where available, otherwise falls back to the unsafe gettimeofday virTimeFieldsNowRaw replacements for gmtime(), convert a timestamp virTimeFieldsThenRaw into a broken out set of fields. No localtime() replacement is provided, because converting to local time is not practical with only async signal safe APIs. virTimeStringNowRaw replacements for strftime() which print a timestamp virTimeStringThenRaw into a string, using a pre-determined format, with a fixed size buffer (VIR_TIME_STRING_BUFLEN) For each of these there is also a version without the Raw postfix which raises a full libvirt error. These versions are not async signal safe * src/Makefile.am, src/util/virtime.c, src/util/virtime.h: New files * src/libvirt_private.syms: New APis * configure.ac: Check for clock_gettime in -lrt * tests/virtimetest.c, tests/Makefile.am: Test new APIs
-
由 Daniel P. Berrange 提交于
Fix the build on Mingw32 by removing the now obsolete virGetPMCapabilities symbol from the private exports file * src/libvirt_private.syms: Remove virGetPMCapabilities
-
由 Daniel P. Berrange 提交于
If suspend failed for some reason (e.g. too short duration) then subsequent attempts to trigger suspend were rejected because we had already marked a suspend as being in progress * src/util/virnodesuspend.c: Don't mark suspend as active until we've successfully triggered it
-
由 Daniel P. Berrange 提交于
* src/lxc/lxc_conf.c, src/uml/uml_conf.c, src/xen/xen_hypervisor.c: Initialize suspend capabilities * tests/xencapsdata/*xml: Add empty powermgmt capabilities
-
由 Daniel P. Berrange 提交于
The command name for the suspend action does not need to be strdup'd. The constant string can be used directly. This also means the code can be trivially rearranged to make the switch clearer * src/util/virnodesuspend.c: Remove strdup of cmdString
-
由 Daniel P. Berrange 提交于
To avoid probing the host power management features on any call to virInitialize, only initialize the mutex in virNodeSuspendInit. Do lazy load of the supported PM target mask when it is actually needed * src/util/virnodesuspend.c: Lazy init of supported features
-
由 Daniel P. Berrange 提交于
If we ensure that virNodeSuspendGetTargetMask always resets *bitmask to zero upon failure, there is no need for the powerMgmt_valid field. * src/util/virnodesuspend.c: Ensure *bitmask is zero upon failure * src/conf/capabilities.c, src/conf/capabilities.h: Remove powerMgmt_valid field * src/qemu/qemu_capabilities.c: Remove powerMgmt_valid
-
由 Daniel P. Berrange 提交于
* src/libvirt_private.syms: Export virNodeSuspendSupportsTarget and virNodeSuspendGetTargetMask
-
由 Daniel P. Berrange 提交于
The node suspend capabilities APIs should not have been put into util.[ch]. Instead move them into virnodesuspend.[ch] * src/util/util.c, src/util/util.h: Remove suspend capabilities APIs * src/util/virnodesuspend.c, src/util/virnodesuspend.h: Add suspend capabilities APIs * src/qemu/qemu_capabilities.c: Include virnodesuspend.h
-
由 Daniel P. Berrange 提交于
Rename virGetPMCapabilities to virNodeSuspendGetTargetMask and virDiscoverHostPMFeature to virNodeSuspendSupportsTarget. * src/util/util.c, src/util/util.h: Rename APIs * src/qemu/qemu_capabilities.c, src/util/virnodesuspend.c: Adjust for new names
-
由 Daniel P. Berrange 提交于
Since virDiscoverHostPMFeature is just checking one feature, there is no reason for it to return a bitmask. Change it to return a boolean * src/util/util.c, src/util/util.h: Make virDiscoverHostPMFeature return a boolean
-
由 Daniel P. Berrange 提交于
The virHostPMCapability enum helper was declared in util.h but implemented in capabilities.c, which is in a completely separate library at link time. Move the declaration into the capabilities.c file and rename it to match normal conventions * src/util/util.h: Remove virHostPMCapability enum decl * src/conf/capabilities.c: Add virCapsHostPMTarget enum
-
由 Daniel P. Berrange 提交于
The capabilities XML uses the x86 specific terms 'S3', 'S4' and 'Hybrid-Syspend'. Switch it to use the same terminology as the API constants and virsh options, eg 'suspend_mem' 'suspend_disk' and 'suspend_hybrid' * docs/formatcaps.html.in, docs/schemas/capability.rng, src/conf/capabilities.c: Rename suspend constants
-
由 Daniel P. Berrange 提交于
The internal virHostPMCapability enum just duplicates the public virNodeSuspendTarget enum, but with different names. * src/util/util.c: Use VIR_NODE_SUSPEND_TARGET constants * src/util/util.h: Remove virHostPMCapability enum * src/conf/capabilities.c: Use VIR_NODE_SUSPEND_TARGET_LAST
-
由 Daniel P. Berrange 提交于
The VIR_NODE_SUSPEND_TARGET constants are not flags, so they should just be assigned straightforward incrementing values. * include/libvirt/libvirt.h.in: Change VIR_NODE_SUSPEND_TARGET values * src/util/virnodesuspend.c: Fix suspend target checks
-
由 Alex Jia 提交于
Detected by Coverity. the only case is caller passes a NULL to 'format' variable, then taking 'if (format)' false branch, the function qcow2GetBackingStoreFormat will directly dereferences the NULL 'format' pointer variable. Signed-off-by: NAlex Jia <ajia@redhat.com>
-
由 Alex Jia 提交于
Fix cmdDomblklist to return 'true' on success instead of '0' https://bugzilla.redhat.com/show_bug.cgi?id=758590Signed-off-by: NAlex Jia <ajia@redhat.com>
-
由 Lei Li 提交于
This patch add new pulic API virDomainSetBlockIoTune and virDomainGetBlockIoTune. Signed-off-by: NLei Li <lilei@linux.vnet.ibm.com> Signed-off-by: NZhi Yong Wu <wuzhy@linux.vnet.ibm.com> Signed-off-by: NEric Blake <eblake@redhat.com>
-