- 03 6月, 2017 14 次提交
-
-
由 John Ferlan 提交于
In preparation for privatizing the virNodeDeviceObj - create an accessor for the @def field and then use it for various callers. Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
由 John Ferlan 提交于
Create nodeDeviceObjFindByName which will perform the corresponding virNodeDeviceObjFindByName call for various node_device_driver callers rather than having the same repetitive code. Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
由 John Ferlan 提交于
Rather than taking an virNodeDeviceObjPtr and dereffing the obj->def, just pass the def. Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
由 John Ferlan 提交于
Rather than taking an virNodeDeviceObjPtr and dereffing the obj->def, just pass the def. Also check for an error in the function to have the calling function goto cleanup on error. Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
由 John Ferlan 提交于
Alter the node_device_driver source and prototypes to follow more recent code style guidelines w/r/t spacing between functions, format of the function, and the prototype definitions. While the new names for nodeDeviceUpdateCaps, nodeDeviceUpdateDriverName, and nodeDeviceGetTime don't follow exactly w/r/t a "vir" prefix, they do follow other driver nomenclature style. Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
由 John Ferlan 提交于
In order to ensure that whenever something is added to virNodeDevCapType that both functions are considered for processing of a new capability, change the if-then-else construct into a switch statement. Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
由 John Ferlan 提交于
When searching for an NPIV capable fc_host, not only does there need to be an "fc_host" capability with the specified wwnn/wwpn or fabric_wwn, but that scsi_host must be vport capable; otherwise, one could end up picking an exising vHBA/NPIV which wouldn't be good. Currently not a problem since scsi_hosts are in an as found forward linked list and the vport capable scsi_hosts will always appear before a vHBA by definition. However, in the near term future a hash table will be used to lookup the devices and that could cause problems for these algorithms. Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
由 John Ferlan 提交于
Alter the algorithm to return a list of matching names rather than a list of match virInterfaceObjPtr which are then just dereferenced extracting the def->name and def->mac. Since the def->mac would be the same as the passed @mac, just return a list of names and as long as there's only one, extract the [0] entry from the passed list. Also alter the error message on failure to include the mac that wasn't found. Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
由 John Ferlan 提交于
Prefix should have been virInterfaceObjList since the API is operating on the list of interfaces. Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
由 John Ferlan 提交于
Move the structs into virinterfaceobj.c, create necessary accessors, and initializers. This also includes reworking virInterfaceObjListClone to handle receiving a source interfaces list pointer, creating the destination interfaces object, and copying everything from source into dest. Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
由 John Ferlan 提交于
Move the struct into virinterfaceobj.c, create necessary accessors, and initializers. Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
由 John Ferlan 提交于
We're about to make the obj much more private, so make it easier to see future changes which will require accessors for the obj->def This also includes modifying some interfaces->objs[i]->X references to be obj = interfaces->objs[i]; and then def = obj->def Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
由 John Ferlan 提交于
Rather than using goto cleanup on object find failure and having cleanup need to check if the obj was present before unlocking, just return immediately. Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
由 John Ferlan 提交于
Alter variable names to be obj rather than 'iface' and/or 'obj'. Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
- 02 6月, 2017 3 次提交
-
-
由 Peter Krempa 提交于
qemuDomainGetBlockInfo would error out if qemu did not report 'wr_highest_offset'. This usually does not happen, but can happen briefly during active layer block commit. There's no need to report the error, we can simply report that the disk is fully alocated at that point. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1452045
-
由 Julio Faracco 提交于
The host address or the socket path have already been checked at the begining of the function virStorageSourceParseNBDColonString(). So, when the parameter is not a unix socket, there is no reason to check the address again because if it does not exists, the logic will fail in the first IF conditional. Signed-off-by: NJulio Faracco <jcfaracco@gmail.com>
-
由 Julio Faracco 提交于
VIR_STRDUP returns -1 if the string copy was not successful. So, the current comparison/logic is throwing an error when VIR_STRDUP() returns 1. Only when source is NULL, it is considering as a success which is not right. Signed-off-by: NJulio Faracco <jcfaracco@gmail.com>
-
- 31 5月, 2017 2 次提交
-
-
由 Michal Privoznik 提交于
In 48d9e6cd and friends we've allowed users to back guest memory by a file inside the host. And in order to keep things manageable the memory_backing_dir variable was introduced to qemu.conf to specify the directory where the files are kept. However, libvirt's policy is that directories are created on domain startup if they don't exist. We've missed this one. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Erik Skultety 提交于
Caused by commit @d1eea6c1 due to the missing symbol on older platforms. Signed-off-by: NErik Skultety <eskultet@redhat.com>
-
- 30 5月, 2017 2 次提交
-
-
由 Erik Skultety 提交于
commit a8eba503 added further checking of the guest shutdown cause, but this enhancement is available since qemu 2.10, causing a crash because of a NULL pointer dereference on older qemus. Thread 1 "libvirtd" received signal SIGSEGV, Segmentation fault. 0x00007ffff72441af in virJSONValueObjectGet (object=0x0, key=0x7fffd5ef11bf "guest") at util/virjson.c:769 769 if (object->type != VIR_JSON_TYPE_OBJECT) (gdb) bt 0 in virJSONValueObjectGet 1 in virJSONValueObjectGetBoolean 2 in qemuMonitorJSONHandleShutdown 3 in qemuMonitorJSONIOProcessEvent 4 in qemuMonitorJSONIOProcessLine 5 in qemuMonitorJSONIOProcess 6 in qemuMonitorIOProcess Signed-off-by: NErik Skultety <eskultet@redhat.com>
-
由 Nitesh Konkar 提交于
Callers expect the return value to be the total number of vcpus in the host (including offline vcpus). The refactor in c67e04e2 broke this assumption by using virHostCPUGetOnlineBitmap which only creates a bitmap long enough to hold the last online vcpu. Report the full number of host vcpus by returning value from virHostCPUGetCount(). Signed-off-by: NNitesh Konkar <nitkon12@linux.vnet.ibm.com> Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
-
- 29 5月, 2017 2 次提交
-
-
由 ning.bo 提交于
When a number of SRIOV VFs (up to 128 on Intel XL710) is created: for i in `seq 0 1`; do echo 63 > /sys/class/net/<interface>/device/sriov_numvfs done libvirtd will then report "udev_monitor_receive_device returned NULL" error because the netlink socket buffer is not big enough (using GDB on libudev confirmed this with ENOBUFFS) and thus some udev events were dropped. This results in some devices being missing in the nodedev-list output. This patch overrides the system's rmem_max limit but for that, we need to make sure we've got root privileges. https://bugzilla.redhat.com/show_bug.cgi?id=1450960Signed-off-by: Nning.bo <ning.bo9@zte.com.cn> Signed-off-by: NErik Skultety <eskultet@redhat.com>
-
由 Michal Privoznik 提交于
The @cpus is allocated by virFileReadValueBitmap() but never freed: ==21274== 40 (32 direct, 8 indirect) bytes in 1 blocks are definitely lost in loss record 808 of 1,004 ==21274== at 0x4C2E080: calloc (vg_replace_malloc.c:711) ==21274== by 0x54BA561: virAlloc (viralloc.c:144) ==21274== by 0x54BC604: virBitmapNewEmpty (virbitmap.c:126) ==21274== by 0x54BD059: virBitmapParseUnlimited (virbitmap.c:570) ==21274== by 0x54EECE9: virFileReadValueBitmap (virfile.c:4113) ==21274== by 0x5563132: virCapabilitiesInitCaches (capabilities.c:1548) ==21274== by 0x2BB86E59: virQEMUCapsInit (qemu_capabilities.c:1132) ==21274== by 0x2BBEC067: virQEMUDriverCreateCapabilities (qemu_conf.c:928) ==21274== by 0x2BC3DEAA: qemuStateInitialize (qemu_driver.c:845) ==21274== by 0x5625AAC: virStateInitialize (libvirt.c:770) ==21274== by 0x124519: daemonRunStateInit (libvirtd.c:881) ==21274== by 0x554C927: virThreadHelper (virthread.c:206) Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 27 5月, 2017 1 次提交
-
-
由 Roman Bogorodskiy 提交于
- Include virerror.h for virReportSystemError - Rename stub functions to match original function names
-
- 26 5月, 2017 15 次提交
-
-
由 Bjoern Walk 提交于
Similar to scsi_host and fc_host, there is a relation between a scsi_target and its transport specific fc_remote_port. Let's expose this relation and relevant information behind it. An example for a virsh nodedev-dumpxml: virsh # nodedev-dumpxml scsi_target0_0_0 <device> <name>scsi_target0_0_0</name> <path>/sys/devices/[...]/host0/rport-0:0-0/target0:0:0</path> <parent>scsi_host0</parent> <capability type='scsi_target'> <target>target0:0:0</target> <capability type='fc_remote_port'> <rport>rport-0:0-0</rport> <wwpn>0x9d73bc45f0e21a86</wwpn> </capability> </capability> </device> Reviewed-by: NBoris Fiuczynski <fiuczy@linux.vnet.ibm.com> Signed-off-by: NBjoern Walk <bwalk@linux.vnet.ibm.com>
-
由 Bjoern Walk 提交于
We will need some convenient helper functions for managing sysfs-entries for fibre channel-backed devices. Let's implement them and make them available in the private API. Signed-off-by: NBjoern Walk <bwalk@linux.vnet.ibm.com>
-
由 Bjoern Walk 提交于
Now that the node_device driver is aware of CCW devices, let's hook up virsh so that we can filter them properly. Reviewed-by: NBoris Fiuczynski <fiuczy@linux.vnet.ibm.com> Reviewed-by: NMarc Hartmayer <mhartmay@linux.vnet.ibm.com> Signed-off-by: NBjoern Walk <bwalk@linux.vnet.ibm.com>
-
由 Bjoern Walk 提交于
Make CCW devices available to the node_device driver. The devices are already seen by udev so let's implement necessary code for detecting them properly. Topologically, CCW devices are similar to PCI devices, e.g.: +- ccw_0_0_1a2b | +- scsi_host0 | +- scsi_target0_0_0 | +- scsi_0_0_0_0 Reviewed-by: NBoris Fiuczynski <fiuczy@linux.vnet.ibm.com> Signed-off-by: NBjoern Walk <bwalk@linux.vnet.ibm.com>
-
由 Marc Hartmayer 提交于
Unlock @obj in case of an error too. Reviewed-by: NBjoern Walk <bwalk@linux.vnet.ibm.com> Reviewed-by: NBoris Fiuczynski <fiuczy@linux.vnet.ibm.com> Signed-off-by: NMarc Hartmayer <mhartmay@linux.vnet.ibm.com>
-
由 Marc Hartmayer 提交于
Since the switch statement is already using the deref'd @cap variable and the VIR_NODE_DEV_CAP_NET case uses it, the SCSI_HOST and PCI_DEV cases may as well use it too. Suggested-by: NBjoern Walk <bwalk@linux.vnet.ibm.com> Signed-off-by: NMarc Hartmayer <mhartmay@linux.vnet.ibm.com>
-
由 Martin Kletzander 提交于
QEMU will likely report the details of it shutting down, particularly whether the shutdown was initiated by the guest or host. We should forward that information along, at least for shutdown events. Reset has that as well, however that is not a lifecycle event and would add extra constants that might not be used. It can be added later on. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1384007Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Richard W.M. Jones 提交于
The number of records that virConnectGetAllDomainStats can return per domain is currently limited to 4096. This is quite low -- for example, a single guest with ~320 disks will hit this limit. This increases the limit to make it much larger. Note that VIR_NET_MESSAGE_MAX still protects the total message size in the case where there are many domains and many disks per domain. I tested this using a guest with 500 disks with no issues. Signed-off-by: NRichard W.M. Jones <rjones@redhat.com> Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1440683
-
由 Richard W.M. Jones 提交于
When increasing the buffer size up to VIR_NET_MESSAGE_MAX, we currently quadruple it each time. This unfortunately means that we cannot allow certain buffer sizes -- for example the current VIR_NET_MESSAGE_MAX == 33554432 can never be "hit" since ‘newlen’ jumps from 16MB to 64MB. Instead of quadrupling, double it each time. Thanks: Daniel Berrange. Signed-off-by: NRichard W.M. Jones <rjones@redhat.com>
-
由 Peter Krempa 提交于
Commit 4337bc57 introduced code that would in certain error paths unref the last reference of a pointer, but return it. Clear the pointers before returning them.
-
由 Yi Wang 提交于
@tmp is leaked after the second call to virVHBAGetConfig within virVHBAIsVportCapable code block because it wasn't freed after making the first call to the function. Signed-off-by: NYi Wang <wang.yi59@zte.com.cn> Signed-off-by: NErik Skultety <eskultet@redhat.com>
-
由 Yi Wang 提交于
The @ipv6_host allocated in virAsprintf may be lost when virAsprintf addrstr failed. Signed-off-by: NYi Wang <wang.yi59@zte.com.cn> Signed-off-by: NErik Skultety <eskultet@redhat.com>
-
由 Julio Faracco 提交于
There is a VIR_FREE after a return statement. That code section is never executed and for this reason the "tty" variable is not being freed. This commit rearranges the logic. Signed-off-by: NJulio Faracco <jcfaracco@gmail.com>
-
由 Ján Tomko 提交于
This option turns on extended interrupt mode, which allows more than 255 vCPUs. https://bugzilla.redhat.com/show_bug.cgi?id=1451282Reviewed-by: NAndrea Bolognani <abologna@redhat.com>
-
由 Ján Tomko 提交于
Add an attribute to control extended interrupt mode. https://bugzilla.redhat.com/show_bug.cgi?id=1451282Reviewed-by: NAndrea Bolognani <abologna@redhat.com>
-
- 25 5月, 2017 1 次提交
-
-
由 Peter Krempa 提交于
'param' contains the correct element from 'params'. If the group name would not be the first parameter libvirtd would crash. Introduced in c53bd25b. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1455510
-