1. 04 1月, 2017 3 次提交
    • A
      util: Fix syntax-check · f0af48f0
      Andrea Bolognani 提交于
      Commit b9cc2483 introduced a new #define but neglected
      to format it properly, thus breaking syntax-check.
      f0af48f0
    • A
      util: Turn virFirewallAddRule() into a macro · b9cc2483
      Andrea Bolognani 提交于
      Clang 3.9 refuses to compile the existing code with the
      following error:
      
        util/virfirewall.c:425:20: error: passing an object that undergoes
                                   default argument promotion to 'va_start'
                                   has undefined behavior [-Werror,-Wvarargs]
            va_start(args, layer);
                           ^
        util/virfirewall.c:420:37: note: parameter of type 'virFirewallLayer'
                                   is declared here
                           virFirewallLayer layer,
                                            ^
      
      This happens because 'layer' is of type virFirewallLayer, which
      is an enum type and not a standard type such as eg. void* or int.
      
      To solve the issue, turn virFirewallAddRule() from a very thin
      wrapper around virFirewallAddRuleFullV() to a macro that expands
      to a call to virFirewallAddRuleFull() - itself a very thin wrapper
      around the aforementioned virFirewallAddRuleFullV() - with no loss
      of functionality or type safety.
      b9cc2483
    • J
      qemu: Don't assume secret provided for LUKS encryption · 7f7d9904
      John Ferlan 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=1405269
      
      If a secret was not provided for what was determined to be a LUKS
      encrypted disk (during virStorageFileGetMetadata processing when
      called from qemuDomainDetermineDiskChain as a result of hotplug
      attach qemuDomainAttachDeviceDiskLive), then do not attempt to
      look it up (avoiding a libvirtd crash) and do not alter the format
      to "luks" when adding the disk; otherwise, the device_add would
      fail with a message such as:
      
         "unable to execute QEMU command 'device_add': Property 'scsi-hd.drive'
          can't find value 'drive-scsi0-0-0-0'"
      
      because of assumptions that when the format=luks that libvirt would have
      provided the secret to decrypt the volume.
      
      Access to unlock the volume will thus be left to the application.
      7f7d9904
  2. 02 1月, 2017 4 次提交
    • M
      networkxml2conftest: s/lo/lo0/ on non-Linux · a6f05c5a
      Michal Privoznik 提交于
      After 478ddedc a bug is fixed where we wrongly presumed loopack
      device name on non-Linux systems. It's lo0. However, the fix is
      not reflected in the tests which are failing now.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      a6f05c5a
    • M
      src: Build libvirt_nss.la iff WITH_NSS · 70b0a8e5
      Michal Privoznik 提交于
      If the nss module is disabled we don't need to build the
      supplementary library for it either.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      70b0a8e5
    • M
      virmacmap: Don't use hash table dataFree callback · 5dc6169b
      Michal Privoznik 提交于
      Due to nature of operations we do over the string list (more
      precisely due to how virStringListRemove() works), it is not the
      best idea to use dataFree callback. Problem is, on MAC address
      remove, the string list remove function modifies the original
      list in place. Then, virHashUpdateEntry() is called which frees
      all the data stored in the list rendering @newMacsList point to
      freed data.
      
      ==16002== Invalid read of size 8
      ==16002==    at 0x50BC083: virFree (viralloc.c:582)
      ==16002==    by 0x513DC39: virStringListFree (virstring.c:251)
      ==16002==    by 0x51089B4: virMacMapHashFree (virmacmap.c:67)
      ==16002==    by 0x50EF30B: virHashAddOrUpdateEntry (virhash.c:352)
      ==16002==    by 0x50EF4FD: virHashUpdateEntry (virhash.c:415)
      ==16002==    by 0x5108BED: virMacMapRemoveLocked (virmacmap.c:129)
      ==16002==    by 0x51092D5: virMacMapRemove (virmacmap.c:346)
      ==16002==    by 0x402F02: testMACRemove (virmacmaptest.c:107)
      ==16002==    by 0x403F15: virTestRun (testutils.c:180)
      ==16002==    by 0x4032C4: mymain (virmacmaptest.c:205)
      ==16002==    by 0x405A3B: virTestMain (testutils.c:992)
      ==16002==    by 0x403D87: main (virmacmaptest.c:237)
      ==16002==  Address 0xdd5a4d0 is 0 bytes inside a block of size 24 free'd
      ==16002==    at 0x4C2AD6F: realloc (vg_replace_malloc.c:693)
      ==16002==    by 0x50BB99B: virReallocN (viralloc.c:245)
      ==16002==    by 0x513DC0B: virStringListRemove (virstring.c:235)
      ==16002==    by 0x5108BA6: virMacMapRemoveLocked (virmacmap.c:124)
      ==16002==    by 0x51092D5: virMacMapRemove (virmacmap.c:346)
      ==16002==    by 0x402F02: testMACRemove (virmacmaptest.c:107)
      ==16002==    by 0x403F15: virTestRun (testutils.c:180)
      ==16002==    by 0x4032C4: mymain (virmacmaptest.c:205)
      ==16002==    by 0x405A3B: virTestMain (testutils.c:992)
      ==16002==    by 0x403D87: main (virmacmaptest.c:237)
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      5dc6169b
    • M
      virmacmap: Fix variable handling · 806582a5
      Michal Privoznik 提交于
      In virMacMapRemoveLocked() we have two variables: @macsList and
      @newMacsList. Obviously, @newMacsList is supposed to hold pointer
      to modified list but in fact it holds pointer to the old list.
      It's confusing.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      806582a5
  3. 23 12月, 2016 5 次提交
  4. 22 12月, 2016 1 次提交
  5. 21 12月, 2016 9 次提交
    • N
      qemu: clean out unused migrate to unix · 9f08b766
      Nikolay Shirokovskiy 提交于
      9f08b766
    • P
      configure: move XenAPI driver check to its own file · 02957106
      Pavel Hrdina 提交于
      Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
      02957106
    • P
      m4/virt-devmapper: use LIBVIRT_CHECK_(PKG|LIB) · 60af91ca
      Pavel Hrdina 提交于
      Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
      60af91ca
    • P
      configure: move windows common check to its own file · 95873193
      Pavel Hrdina 提交于
      This renames MSCOM_LIBS to WIN32_EXTRA_LIBS to make it consistent with
      WIN32_EXTRA_CFLAGS.
      Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
      95873193
    • P
      configure: move with-driver-modules check to its own file · aee0043b
      Pavel Hrdina 提交于
      Rename DRIVER_MODULE_(LDFLAGS|LIBS|CFLAGS) to unify the naming.
      Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
      aee0043b
    • C
      xen: add QED format test · 9cae9c88
      Cédric Bosdonnat 提交于
      Follow up of commit 340bb6b7 to add unit tests for the QED format
      support. Also add missing QED case in xenFormatXLDisk()
      9cae9c88
    • J
      storage: Introduce virStorageVolInfoFlags · 0c234889
      John Ferlan 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=1332019
      
      This function will essentially be a wrapper to virStorageVolInfo in order
      to provide a mechanism to have the "physical" size of the volume returned
      instead of the "allocation" size. This will provide similar capabilities to
      the virDomainBlockInfo which can return both allocation and physical of a
      domain storage volume.
      
      NB: Since we're reusing the _virStorageVolInfo and not creating a new
      _virStorageVolInfoFlags structure, we'll need to generate the rpc APIs
      remoteStorageVolGetInfoFlags and remoteDispatchStorageVolGetInfoFlags
      (although both were originally created from gendispatch.pl and then
      just copied into daemon/remote.c and src/remote/remote_driver.c).
      
      The new API will allow the usage of a VIR_STORAGE_VOL_GET_PHYSICAL flag
      and will make the decision to return the physical or allocation value
      into the allocation field.
      
      In order to get that physical value, virStorageBackendUpdateVolTargetInfoFD
      adds logic to fill in physical value matching logic in qemuStorageLimitsRefresh
      used by virDomainBlockInfo when the domain is inactive.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      0c234889
    • J
      conf: Display <physical> in output of voldef · 78661cb1
      John Ferlan 提交于
      Although the virStorageBackendUpdateVolTargetInfo will update the
      target.physical value, there is no way to provide that information
      via the virStorageGetVolInfo API since it only returns the capacity
      and allocation of a volume. So as described in commit id '0282ca45',
      it should be possible to generate an output only <physical> value
      for that purpose.
      
      This patch generates the <physical> value in the volume XML output
      for the sole purpose of being able to view/see the value to allow
      someone to parse the XML in order to obtain the value.
      
      Update the documentation to describe the output only nature.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      78661cb1
    • J
      qemu: Adjust qemuDomainGetBlockInfo data for sparse backed files · b9b1aa63
      John Ferlan 提交于
      According to commit id '0282ca45' the 'physical' value should
      essentially be the last offset of the image or the host physical
      size in bytes of the image container. However, commit id '15fa84ac'
      refactored the GetBlockInfo to use the same returned data as the
      GetStatsBlock API for an active domain. For the 'entry->physical'
      that would end up being the "actual-size" as set through the
      qemuMonitorJSONBlockStatsUpdateCapacityOne (commit '7b11f5e5').
      Digging deeper into QEMU code one finds that actual_size is
      filled in using the same algorithm as GetBlockInfo has used for
      setting the 'allocation' field when the domain is inactive.
      
      The difference in values is seen primarily in sparse raw files
      and other container type files (such as qcow2), which will return
      a smaller value via the stat API for 'st_blocks'. Additionally
      for container files, the 'capacity' field (populated via the
      QEMU "virtual-size" value) may be slightly different (smaller)
      in order to accomodate the overhead for the container. For
      sparse files, the state 'st_size' field is returned.
      
      This patch thus alters the allocation and physical values for
      sparse backed storage files to be more appropriate to the API
      contract. The result for GetBlockInfo is the following:
      
       capacity: logical size in bytes of the image (how much storage
                 the guest will see)
       allocation: host storage in bytes occupied by the image (such
                   as highest allocated extent if there are no holes,
                   similar to 'du')
       physical: host physical size in bytes of the image container
                 (last offset, similar to 'ls')
      
      NB: The GetStatsBlock API allows a different contract for the
      values:
      
       "block.<num>.allocation" - offset of the highest written sector
                                  as unsigned long long.
       "block.<num>.capacity" - logical size in bytes of the block device
                                backing image as unsigned long long.
       "block.<num>.physical" - physical size in bytes of the container
                                of the backing image as unsigned long long.
      b9b1aa63
  6. 20 12月, 2016 7 次提交
  7. 19 12月, 2016 3 次提交
  8. 17 12月, 2016 1 次提交
  9. 16 12月, 2016 7 次提交