1. 10 12月, 2013 3 次提交
  2. 03 12月, 2013 1 次提交
    • P
      qemu: Refactor qemuTranslateDiskSourcePool · e1a4d08b
      Peter Krempa 提交于
      Before this patch, the translation function still needs a second ugly
      helper function to actually format the command line for qemu. But if we
      do the right stuff in the translation function, we don't have to bother
      with the second function any more.
      
      This patch removes the messy qemuBuildVolumeString function and changes
      qemuTranslateDiskSourcePool to set stuff up correctly so that the
      regular code paths meant for volumes can be used to format the command
      line correctly.
      
      For this purpose a new helper "qemuDiskGetActualType()" is introduced to
      return the type of the volume in a pool.
      
      As a part of the refactor the qemuTranslateDiskSourcePool function is
      fixed to do decisions based on the pool type instead of the volume type.
      This allows to separate pool-type-specific stuff more clearly and will
      ease addition of other pool types that will require certain other
      operations to get the correct pool source.
      
      The previously fixed tests should make sure that we don't break stuff
      that was working before.
      e1a4d08b
  3. 02 12月, 2013 2 次提交
  4. 28 11月, 2013 2 次提交
  5. 27 11月, 2013 1 次提交
  6. 12 11月, 2013 1 次提交
  7. 07 11月, 2013 3 次提交
    • E
      storage: always probe type with buffer · 348b4e25
      Eric Blake 提交于
      This gets rid of another stat() per volume, as well as cutting
      bytes read in half, when populating the volumes of a directory
      pool during a pool refresh.  Not to mention that it provides an
      interface that can let gluster pools also probe file types.
      
      * src/util/virstoragefile.h (virStorageFileProbeFormatFromFD):
      Delete.
      (virStorageFileProbeFormatFromBuf): New prototype.
      (VIR_STORAGE_MAX_HEADER): New constant, based on...
      * src/util/virstoragefile.c (STORAGE_MAX_HEAD): ...old name.
      (vmdk4GetBackingStore, virStorageFileGetMetadataInternal)
      (virStorageFileProbeFormat): Adjust clients.
      (virStorageFileProbeFormatFromFD): Delete.
      (virStorageFileProbeFormatFromBuf): Export.
      * src/storage/storage_backend_fs.c (virStorageBackendProbeTarget):
      Adjust client.
      * src/libvirt_private.syms (virstoragefile.h): Adjust exports.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      348b4e25
    • E
      storage: refactor backing chain division of labor · 3ead2e7d
      Eric Blake 提交于
      Future patches will want to learn metadata about a file using
      a buffer that was already parsed in order to probe the file's
      format.  Rather than reopening and re-reading the file, it makes
      sense to separate getting file contents from actually parsing
      those contents.
      
      * src/util/virstoragefile.c (virStorageFileGetMetadataFromBuf)
      (virStorageFileGetMetadataFromFDInternal): New functions.
      (virStorageFileGetMetadataInternal): Hoist fstat() and read() into
      callers.
      (virStorageFileGetMetadataFromFD)
      (virStorageFileGetMetadataRecurse): Rework clients.
      * src/util/virstoragefile.h (virStorageFileGetMetadataFromBuf):
      New prototype.
      * src/libvirt_private.syms (virstoragefile.h): Export it.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      3ead2e7d
    • E
      storage: avoid short reads while chasing backing chain · 5327fad4
      Eric Blake 提交于
      Our backing file chain code was not very robust to an ill-timed
      EINTR, which could lead to a short read causing us to randomly
      treat metadata differently than usual.  But the existing
      virFileReadLimFD forces an error if we don't read the entire
      file, even though we only care about the header of the file.
      So add a new virFile function that does what we want.
      
      * src/util/virfile.h (virFileReadHeaderFD): New prototype.
      * src/util/virfile.c (virFileReadHeaderFD): New function.
      * src/libvirt_private.syms (virfile.h): Export it.
      * src/util/virstoragefile.c (virStorageFileGetMetadataInternal)
      (virStorageFileProbeFormatFromFD): Use it.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      5327fad4
  8. 05 11月, 2013 1 次提交
  9. 04 11月, 2013 4 次提交
  10. 29 10月, 2013 2 次提交
  11. 21 10月, 2013 2 次提交
  12. 15 10月, 2013 1 次提交
  13. 14 10月, 2013 2 次提交
  14. 11 10月, 2013 1 次提交
  15. 10 10月, 2013 1 次提交
    • P
      qemu: Prefer VFIO for PCI device passthrough · f094aaac
      Peter Krempa 提交于
      Prefer using VFIO (if available) to the legacy KVM device passthrough.
      
      With this patch a PCI passthrough device without the driver configured
      will be started with VFIO if it's available on the host. If not legacy
      KVM passthrough is checked and error is reported if it's not available.
      f094aaac
  16. 05 10月, 2013 1 次提交
    • E
      build: fix build --without-remote · bdc55cc7
      Eric Blake 提交于
      I tried to test ./configure --without-lxc --without-remote.
      First, the build failed with some odd errors, such as an
      inability to build xen, or link failures for virNetTLSInit.
      But when you think about it, once there is no remote code,
      all of libvirtd is useless, any stateful driver that depends
      on libvirtd is also not worth compiling, and any libraries
      used only by RPC code are not needed.  So I patched
      configure.ac to make for some saner defaults when an
      explicit disable is attempted.  Similarly, since we have
      migrated virnetdevbridge into generic code, the workaround
      for Linux kernel stupidity must not depend on stateful
      drivers being in use.
      
      Then there's 'make check' that needs segregation.
      
      Wow - quite a bit of cleanup to make --without-remote useful :)
      
      * configure.ac: Let --without-remote toggle defaults on stateful
      drivers and other libraries.  Pick up Linux kernel workarounds
      even when qemu and lxc are not being compiled.
      * tests/Makefile.am (test_programs): Factor out programs that
      require remote.
      * src/libvirt_private.syms (rpc/virnet*.h): Move...
      * src/libvirt_remote.syms: ...into new file.
      * src/Makefile.am (SYM_FILES): Ship new syms file.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      bdc55cc7
  17. 04 10月, 2013 1 次提交
  18. 30 9月, 2013 1 次提交
  19. 25 9月, 2013 1 次提交
    • L
      util/viriptables: add/remove rules that short-circuit masquerading · ccca5dc3
      Laszlo Ersek 提交于
      The functions
      - iptablesAddForwardDontMasquerade(),
      - iptablesRemoveForwardDontMasquerade
      handle exceptions in the masquerading implemented in the POSTROUTING chain
      of the "nat" table. Such exceptions should be added as chronologically
      latest, logically top-most rules.
      
      The bridge driver will call these functions beginning with the next patch:
      some special destination IP addresses always refer to the local
      subnetwork, even though they don't match any practical subnetwork's
      netmask. Packets from virbrN targeting such IP addresses are never routed
      outwards, but the current rules treat them as non-virbrN-destined packets
      and masquerade them. This causes problems for some receivers on virbrN.
      Signed-off-by: NLaszlo Ersek <lersek@redhat.com>
      ccca5dc3
  20. 24 9月, 2013 2 次提交
  21. 17 9月, 2013 4 次提交
  22. 16 9月, 2013 1 次提交
  23. 29 8月, 2013 1 次提交
    • P
      qemu: Remove hostdev entry when freeing the depending network entry · 50348e6e
      Peter Krempa 提交于
      When using a <interface type="network"> that points to a network with
      hostdev forwarding mode a hostdev alias is created for the network. This
      allias is inserted into the hostdev list, but is backed with a part of
      the network object that it is connected to.
      
      When a VM is being stopped qemuProcessStop() calls
      networkReleaseActualDevice() which eventually frees the memory for the
      hostdev object. Afterwards when the domain definition is being freed by
      virDomainDefFree() an invalid pointer is accessed by
      virDomainHostdevDefFree() and may cause a crash of the daemon.
      
      This patch removes the entry in the hostdev list before freeing the
      depending memory to avoid this issue.
      
      Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1000973
      50348e6e
  24. 28 8月, 2013 1 次提交