- 18 7月, 2014 3 次提交
-
-
由 Roman Bogorodskiy 提交于
Commit 93e82727 introduced numatune_conf.h file that contains typedefs already defined in domain_conf.h, such as: - virDomainNumatune - virDomainNumatunePtr - virDomainDef - virDomainDefPtr As numatune_conf.h is included by domain_conf.h, clang complains about redefinition of typedef and the build fails. In order to fix it, drop typedefs already defined by numatume_conf.h from domain_conf.h.
-
由 John Ferlan 提交于
Commit id '0e2d7305' modified the code to allow a negative value to be supplied for the bandwidth argument of the various block virsh commands and the migrate-setspeed; however, it failed to update the man page to describe the "feature" whereby a very large value could be interpreted by the hypervisor to mean maximum value allowed. Although initially designed to handle a -1 value, the reality is just about any negative value could be provided and essentially perform the same feature.
-
由 John Ferlan 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1087104 Commit id 'c6212539' explicitly allowed a negative value to be used for offset and length as a shorthand for the largest value after commit id 'f18c02ec' modified virStrToLong_ui() to essentially disallow a negative value. However, allowing a negative value for offset ONLY worked if the negative value was -1 since the eventual lseek() does allow a -1 to mean the end of the file. Providing other negative values resulted in errors such as: $ virsh vol-download --pool default qcow3-vol2 /home/vm-images/raw \ --offset -2 --length -1000 error: cannot download from volume qcow3-vol2 error: Unable to seek /home/vm-images/qcow3-vol2 to 18446744073709551614: Invalid argument $ Thus, it seems unreasonable to expect or allow a negative value for offset since the only benefit is to lseek() to the end of the file and then only take advantage of how the OS would handle such a seek. For the purposes of upload or download of volume data, that seems to be a no-op. Therefore, disallow a negative value for offset. Additionally, modify the man page for vol-upload and vol-download to provide more details regarding the valid values for both offset and length.
-
- 17 7月, 2014 24 次提交
-
-
由 Peter Krempa 提交于
Test also the TITLE and DESCRIPTION metadata types.
-
由 Ján Tomko 提交于
Coverity complains about the return value of ioctl not being checked. Even though we carry on when this fails (just like qemu-img does), we can log an error.
-
由 Peter Krempa 提交于
For non-local storage drivers we can't expect to use the "scrub" tool to wipe the volume. Split the code into a separate backend function so that we can add protocol specific code later. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1118710
-
由 Peter Krempa 提交于
The next patch will move the storage volume wiping code into the individual backends. This patch splits out the common code to wipe a local volume into a separate backend helper so that the next patch is simpler.
-
由 Eric Blake 提交于
The previous commit 09d4d261 put the interleave at the wrong point; it didn't allow interleaving with <memory>. * docs/schema/domaincommon.rng (numatune): Fix interleave location. * tests/qemuxml2argvdata/qemuxml2argv-numatune-memnode.xml: Adjust test. Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Geoff Hickey 提交于
For ESX, the code that builds XML descriptions for attached storage pools was not setting the host count to anything when it returned a host name.
-
由 Martin Kletzander 提交于
Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
When domain is started with numatune memory mode strict and the nodeset does not include host NUMA node with DMA and DMA32 zones, KVM initialization fails. This is because cgroup restrict even kernel allocations. We are already doing numa_set_membind() which does the same thing, only it does not restrict kernel allocations. This patch leaves the userspace numa_set_membind() in place and moves the cpuset.mems setting after the point where monitor comes up, but before vcpu and emulator sub-groups are created. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
Currently, we only bind the whole QEMU domain to memory nodes specified in nodemask altogether. That, however, doesn't make much sense when one wants to control from where the memory for particular guest nodes should be allocated. QEMU allows us to do that by specifying 'host-nodes' parameter for the 'memory-backend-ram' object, so let's use that. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
When qemu switched to using OptsVisitor for -numa parameter, it did two things in the same patch. One of them is that the numa parameter is now visible in "query-command-line-options", the second one is that it enabled using disjoint cpu ranges for -numa specification. This will be used in later patch. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
The numa patch series in qemu adds "memory-backend-ram" object type by which we can tell whether we can use such objects. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
That can be lately achieved with by having .param == NULL in the virQEMUCapsCommandLineProps struct. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
There were numerous places where numatune configuration (and thus domain config as well) was changed in different ways. On some places this even resulted in persistent domain definition not to be stable (it would change with daemon's restart). In order to uniformly change how numatune config is dealt with, all the internals are now accessible directly only in numatune_conf.c and outside this file accessors must be used. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
Since there was already public virDomainNumatune*, I changed the private virNumaTune to match the same, so all the uses are unified and public API is kept: s/vir\(Domain\)\?Numa[tT]une/virDomainNumatune/g then shrunk long lines, and mainly functions, that were created after that: sed -i 's/virDomainNumatuneMemPlacementMode/virDomainNumatunePlacement/g' And to cope with the enum name, I haad to change the constants as well: s/VIR_NUMA_TUNE_MEM_PLACEMENT_MODE/VIR_DOMAIN_NUMATUNE_PLACEMENT/g Last thing I did was at least a little shortening of already long name: s/virDomainNumatuneDef/virDomainNumatune/g Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
There are many places with numatune-related code that should be put into special numatune_conf and this patch creates a basis for that. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
In XML format, by definition, order of fields should not matter, so order of parsing the elements doesn't affect the end result. When specifying guest NUMA cells, we depend only on the order of the 'cell' elements. With this patch all older domain XMLs are parsed as before, but with the 'id' attribute they are parsed and formatted according to that field. This will be useful when we have tuning settings for particular guest NUMA node. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
to ease the review of commits to follow. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
Excerpt from the virCommandAddArgBuffer() description: "Correctly transfers memory errors or contents from buf to cmd." Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
to ease the review of commits to follow. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Michele Paolino 提交于
This patch adds support for the QEMU vhost-user feature to libvirt. vhost-user enables the communication between a QEMU virtual machine and other userspace process using the Virtio transport protocol. It uses a char dev (e.g. Unix socket) for the control plane, while the data plane based on shared memory. The XML looks like: <interface type='vhostuser'> <mac address='52:54:00:3b:83:1a'/> <source type='unix' path='/tmp/vhost.sock' mode='server'/> <model type='virtio'/> </interface> Signed-off-by: NMichele Paolino <m.paolino@virtualopensystems.com> Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 16 7月, 2014 13 次提交
-
-
由 Eric Blake 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1119173 documents that commit eaba79d2 was flawed in the implementation of the VIR_DOMAIN_BLOCK_JOB_ABORT_ASYNC flag when it comes to completing a blockcopy. Basically, the qemu pivot action is async (the QMP command returns immediately, but the user must wait for the BLOCK_JOB_COMPLETE event to know that all I/O related to the job has finally been flushed), but the libvirt command was documented as synchronous by default. As active block commit will also be using this code, it is worth fixing now. * src/qemu/qemu_driver.c (qemuDomainBlockJobImpl): Don't skip wait loop after pivot. Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Eric Blake 提交于
Now that we've finally fixed all the violators, it's time to enforce that any pointer to a const object is never freed (it is aliasing some other memory, where the non-const original should be freed instead). Alas, the code still needs a normal vs. Coverity version, but at least we are still guaranteeing that the macro call evaluates its argument exactly once. I verified that we still get the following compiler warnings, which in turn halts the build thanks to -Werror on gcc (hmm, gcc 4.8.3's placement of the ^ for ?: type mismatch is a bit off, but that's not our problem): int oops1 = 0; VIR_FREE(oops1); const char *oops2 = NULL; VIR_FREE(oops2); struct blah { int dummy; } oops3; VIR_FREE(oops3); util/virauthconfig.c:159:35: error: pointer/integer type mismatch in conditional expression [-Werror] VIR_FREE(oops1); ^ util/virauthconfig.c:161:5: error: passing argument 1 of 'virFree' discards 'const' qualifier from pointer target type [-Werror] VIR_FREE(oops2); ^ In file included from util/virauthconfig.c:28:0: util/viralloc.h:79:6: note: expected 'void *' but argument is of type 'const void *' void virFree(void *ptrptr) ATTRIBUTE_NONNULL(1); ^ util/virauthconfig.c:163:35: error: type mismatch in conditional expression VIR_FREE(oops3); ^ * src/util/viralloc.h (VIR_FREE): No longer cast away const. * src/xenapi/xenapi_utils.c (xenSessionFree): Work around bogus header. Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Chunyan Liu 提交于
Add file in storagevolxml2xmlin and storagevolxml2xmlout, let storagevolxml2xmltest and storagevolschematest cover 'nocow'. Add test case to storagevolxml2argvtest to cover 'nocow'. Signed-off-by: NChunyan Liu <cyliu@suse.com>
-
由 Chunyan Liu 提交于
Add 'nocow' to storage volume xml so that user can have an option to set NOCOW flag to the newly created volume. It's useful on btrfs file system to enhance performance. Btrfs has low performance when hosting VM images, even more when the guest in those VM are also using btrfs as file system. One way to mitigate this bad performance is to turn off COW attributes on VM files. Generally, there are two ways to turn off COW on btrfs: a) by mounting fs with nodatacow, then all newly created files will be NOCOW. b) per file. Add the NOCOW file attribute. It could only be done to empty or new files. This patch tries the second way, according to 'nocow' option, it could set NOCOW flag per file: for raw file images, handle 'nocow' in libvirt code; for non-raw file images, pass 'nocow=on' option to qemu-img, and let qemu-img to handle that (requires qemu-img version >= 2.1). Signed-off-by: NChunyan Liu <cyliu@suse.com>
-
由 Michal Privoznik 提交于
In many places we define a variable as a 'const char *' when in fact we modify it just a few lines below. Or even free it. We should not do that. There's one exception though, in xenSessionFree() xenapi_utils.c. We are freeing the xen_session structure which is defined in xen/api/xen_common.h public header. The structure contains session_id which is type of 'const char *' when in fact it should have been just 'char *'. So I'm leaving this unmodified, just noticing the fact in comment. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Peter Krempa 提交于
When the backing store of a volume wasn't accessible while updating the volume definition the call would fail altogether. In cases where we currently (incorrectly) treat remote backing stores as local one this might lead to strange errors. Ignore the opening errors until we figure out how to track proper volume metadata.
-
由 Peter Krempa 提交于
Use the backing store parser to properly create the information about a volume's backing store. Unfortunately as the storage driver isn't prepared to allow volumes backed by networked filesystems add a workaround that will avoid changing the XML output.
-
由 Peter Krempa 提交于
Move the processing of the backend metadata directly to the helper instead of passing it through arguments to the function.
-
由 Peter Krempa 提交于
virStorageBackendFileSystemRefresh() used "cleanup" label just for error exits and didn't meet libvirt's standard for braces in one case.
-
由 Peter Krempa 提交于
As we have a nested pointer for storing the backing store of a volume there's no need to store it in a separate struct.
-
由 Peter Krempa 提交于
-
由 Ján Tomko 提交于
Assign the value we're comparing: (val = func()) < 0 instead of assigning the comparison value: (val = func() < 0) Both were introduced along with the code, the TLS tests by commit bd789dff in 0.9.4 net events by commit de87691f in 1.2.2. Note that the event id type fix is a no-op: vshNetworkEventIdTypeFromString can only return -1 (failure) and the event is never used or 0 (the only possible event) and the value of 0 < 0 is still 0.
-
由 Ján Tomko 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1119592 Introduced by commit 62927dd8 v0.7.6.
-