1. 18 12月, 2013 2 次提交
    • M
      storage: resize vol against real allocated size · b0579ed9
      Michal Privoznik 提交于
      Currently, 'vol-resize --allocate' allocates new space at the
      vol->capacity offset. But the vol->capacity is not necessarily the same
      as vol->allocation. For instance:.
      
      	[root@localhost ~]# virsh vol-list --pool tmp-pool --details
      	 Name      Path                   Type  Capacity  Allocation
      	-------------------------------------------------------------
      	 tmp-vol  /root/tmp-pool/tmp-vol  file  1.00 GiB  1.00 GiB
      
      	[root@localhost ~]# virsh vol-resize tmp-vol --pool tmp-pool 2G
      
      	[root@localhost ~]# virsh vol-list --pool tmp-pool --details
      	 Name      Path                   Type  Capacity  Allocation
      	-------------------------------------------------------------
      	 tmp-vol  /root/tmp-pool/tmp-vol  file  2.00 GiB  1.00 GiB
      
      So, if we want to allocate more bytes, so the file is say 3G big, the
      real allocated size is 2G actually:
      
      	[root@localhost ~]# virsh vol-resize tmp-vol --pool tmp-pool 3G --allocate
      
      	[root@localhost ~]# virsh vol-list --pool tmp-pool --details
      	 Name      Path                   Type  Capacity  Allocation
      	-------------------------------------------------------------
      	 tmp-vol  /root/tmp-pool/tmp-vol  file  3.00 GiB  2.00 GiB
      
      This commit uses the correct vol->allocation instead of incorrect
      vol->capacity, so the output of the commands above looks like this:
      
      	[root@localhost ~]# virsh vol-resize tmp-vol --pool tmp-pool 3G --allocate
      
      	[root@localhost ~]# virsh vol-list --pool tmp-pool --details
      	 Name      Path                   Type  Capacity  Allocation
      	-------------------------------------------------------------
      	 tmp-vol  /root/tmp-pool/tmp-vol  file  3.00 GiB  3.00 GiB
      
      Moreover, if the '--alocate' flag was used, we must update the
      vol->allocation member in storageVolResize API too, not just
      vol->capacity.
      Reported-by: NWang Sen <wangsen@linux.vnet.ibm.com>
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      b0579ed9
    • W
      Support transient attribute on vmware disks · 5d7e4f0c
      Wout Mertens 提交于
      vmx/vmx.c ignores the transient attribute on the disk xml format. This patch
      adds a 1-1 relationship between it and [disk].mode = "independent-nonpersistent".
      
      The other modes are ignored as before. It works in my testing.
      
      https://bugzilla.redhat.com/show_bug.cgi?id=1044023Signed-off-by: NEric Blake <eblake@redhat.com>
      5d7e4f0c
  2. 17 12月, 2013 1 次提交
  3. 16 12月, 2013 1 次提交
  4. 14 12月, 2013 5 次提交
  5. 13 12月, 2013 7 次提交
    • N
      Fix memory leak in virObjectEventCallbackListRemoveID() · 34d52b34
      Nehal J Wani 提交于
      While running objecteventtest, it was found that valgrind pointed out the
      following memory leak:
      
      ==13464== 5 bytes in 1 blocks are definitely lost in loss record 7 of 134
      ==13464==    at 0x4A0887C: malloc (vg_replace_malloc.c:270)
      ==13464==    by 0x341F485E21: strdup (strdup.c:42)
      ==13464==    by 0x4CAE28F: virStrdup (virstring.c:554)
      ==13464==    by 0x4CF3CBE: virObjectEventCallbackListAddID (object_event.c:286)
      ==13464==    by 0x4CF49CA: virObjectEventStateRegisterID (object_event.c:729)
      ==13464==    by 0x4CF73FE: virDomainEventStateRegisterID (domain_event.c:1424)
      ==13464==    by 0x4D7358F: testConnectDomainEventRegisterAny (test_driver.c:6032)
      ==13464==    by 0x4D600C8: virConnectDomainEventRegisterAny (libvirt.c:19128)
      ==13464==    by 0x402409: testDomainStartStopEvent (objecteventtest.c:232)
      ==13464==    by 0x403451: virtTestRun (testutils.c:138)
      ==13464==    by 0x402012: mymain (objecteventtest.c:395)
      ==13464==    by 0x403AF2: virtTestMain (testutils.c:593)
      ==13464==
      34d52b34
    • M
      qemu: check for reboot-timeout on monitor · 15275f2e
      Martin Kletzander 提交于
      The support for <boot rebootTimeout="12345"/> was added before we were
      checking for qemu command line options in QMP, so we haven't properly
      adapted virQEMUCaps when using it and thus we report unsupported
      option with new enough qemu.
      
      Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1042690Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
      15275f2e
    • C
      lxc: return -1 if failed to kill lxc process · 5ed324a2
      Chen Hanxiao 提交于
      We missed a return when virProcessKillPainfully
      failed to kill lxc process
      Signed-off-by: NChen Hanxiao <chenhanxiao@cn.fujitsu.com>
      5ed324a2
    • E
      object: require maximal alignment in base class · fca4f233
      Eric Blake 提交于
      Recent changes to events (commit 8a29ffcf) resulted in new compile
      failures on some targets (such as ARM OMAP5):
      conf/domain_event.c: In function 'virDomainEventDispatchDefaultFunc':
      conf/domain_event.c:1198:30: error: cast increases required alignment of
      target type [-Werror=cast-align]
      conf/domain_event.c:1314:34: error: cast increases required alignment of
      target type [-Werror=cast-align]
      cc1: all warnings being treated as errors
      
      The error is due to alignment; the base class is merely aligned
      to the worst of 'int' and 'void*', while the child class must
      be aligned to a 'long long'.  The solution is to include a
      'long long' (and for good measure, a function pointer) in the
      base class to ensure correct alignment regardless of what a
      child class may add, but to wrap the inclusion in a union so
      as to not incur any wasted space.  On a typical x86_64 platform,
      the base class remains 16 bytes; on i686, the base class remains
      12 bytes; and on the impacted ARM platform, the base class grows
      from 12 bytes to 16 bytes due to the increase of alignment from
      4 to 8 bytes.
      
      Reported by Michele Paolino and others.
      
      * src/util/virobject.h (_virObject): Use a union to ensure that
      subclasses never have stricter alignment than the parent.
      * src/util/virobject.c (virObjectNew, virObjectUnref)
      (virObjectRef): Adjust clients.
      * src/libvirt.c (virConnectRef, virDomainRef, virNetworkRef)
      (virInterfaceRef, virStoragePoolRef, virStorageVolRef)
      (virNodeDeviceRef, virSecretRef, virStreamRef, virNWFilterRef)
      (virDomainSnapshotRef): Likewise.
      * src/qemu/qemu_monitor.c (qemuMonitorOpenInternal)
      (qemuMonitorClose): Likewise.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      fca4f233
    • H
      qemu: add support for -device pvpanic · 4d18758d
      Hu Tao 提交于
      Map the new <panic> device in XML to the '-device pvpanic' command
      line of qemu.  Clients can then couple the <panic> device and the
      <on_crash> directive to control behavior when the guest reports
      a panic to qemu.
      Signed-off-by: NHu Tao <hutao@cn.fujitsu.com>
      Signed-off-by: NEric Blake <eblake@redhat.com>
      4d18758d
    • H
      conf: add support for panic device · 4313fead
      Hu Tao 提交于
      panic device is a device that enables libvirt to receive notification
      of guest panic event.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      4313fead
    • H
      conf: introduce generic ISA address · f1a039ef
      Hu Tao 提交于
      For example:
      <address type='isa' iobase='0x505' irq='0x1'/>
      Signed-off-by: NEric Blake <eblake@redhat.com>
      f1a039ef
  6. 12 12月, 2013 3 次提交
  7. 11 12月, 2013 9 次提交
  8. 10 12月, 2013 12 次提交