1. 14 6月, 2011 14 次提交
    • E
      command: avoid double close · f3d67544
      Eric Blake 提交于
      Previously, the parent process opened 'null' to /dev/null, then
      the child process closes 'null' as well as 'childout'.  But if
      childout was set to be null, then this is a double close.  At
      least the double close was confined to the child process after a
      fork, and therefore there is no risk of another thread opening
      an fd of the same value to be bitten by the double close, but it
      is always better to avoid double-close to begin with.
      
      Additionally, if all three fds were specified, then opening
      'null' was wasted.
      
      This patch fixes things to lazily open null on the first use,
      then guarantees it gets closed exactly once.
      
      * src/util/command.c (getDevNull): New helper function.
      (virExecWithHook): Use it to avoid spurious opens and double close.
      f3d67544
    • E
      command: reduce duplicated debug messages · c668c897
      Eric Blake 提交于
      This also reduces malloc pressure for invoking a child when
      VIR_DEBUG is enabled.
      
      * src/util/command.c (virExecWithHook): Drop debug, since the only
      caller (virCommandRunAsync) also prints debug info.
      c668c897
    • E
      docs: improve VIR_DOMAIN_AFFECT_CURRENT description · ccf7c4b9
      Eric Blake 提交于
      * include/libvirt/libvirt.h.in (virDomainModificationImpact): Reword.
      ccf7c4b9
    • C
      qemu: Fix parsing 'info chardev' · c0980a3a
      Cole Robinson 提交于
      If qemu supports -chardev, our char frontend aliases are ex. 'charserial0'
      not just 'serial0'. Typically we don't use this code path because the
      pty's are scraped from stdout.
      c0980a3a
    • C
      qemu: Scrape stdout for virtio console pty · d0b1a9a0
      Cole Robinson 提交于
      Currently we forget to do this and have to fallback to info chardev (which
      also fails, see following patch)
      d0b1a9a0
    • M
      virsh: Add daemon version reporting · f67f9650
      Michal Privoznik 提交于
      'virsh version' might report against which version of libvirtd is
      running.
      f67f9650
    • G
    • O
      util: Cleanup indention problem in virterror.c · e22a6e9d
      Osier Yang 提交于
      Push under trivial rule.
      e22a6e9d
    • O
      qemu: Parse current balloon value returned by query_balloon · 41514f7b
      Osier Yang 提交于
      Qemu once supported following memory stats which will returned by
      "query_balloon":
      
          stat_put(dict, "actual", actual);
          stat_put(dict, "mem_swapped_in", dev->stats[VIRTIO_BALLOON_S_SWAP_IN]);
          stat_put(dict, "mem_swapped_out", dev->stats[VIRTIO_BALLOON_S_SWAP_OUT]);
          stat_put(dict, "major_page_faults", dev->stats[VIRTIO_BALLOON_S_MAJFLT]);
          stat_put(dict, "minor_page_faults", dev->stats[VIRTIO_BALLOON_S_MINFLT]);
          stat_put(dict, "free_mem", dev->stats[VIRTIO_BALLOON_S_MEMFREE]);
          stat_put(dict, "total_mem", dev->stats[VIRTIO_BALLOON_S_MEMTOT]);
      
      But it later disabled all the stats except "actual" by commit
      07b0403dfc2b2ac179ae5b48105096cc2d03375a.
      
      libvirt doesn't parse "actual", so user will always see a empty result
      with "virsh dommemstat $domain". Even qemu haven't disabled the stats,
      we should support parsing "actual".
      41514f7b
    • T
      vcpupin: Fix cpu affinity setting bug of qemu driver · d5f3320d
      Taku Izumi 提交于
      There is the case where cpu affinites for vcpu of qemu doesn't work
      correctly. For example, if only one vcpupin setting entry is provided
      and its setting is not for vcpu0, it doesn't work.
      
         # virsh dumpxml VM
         ...
         <vcpu>4</vcpu>
         <cputune>
           <vcpupin vcpu='3' cpuset='9-11'/>
         </cputune>
         ...
      
         # virsh start VM
         Domain VM started
      
         # virsh vcpuinfo VM
         VCPU:           0
         CPU:            31
         State:          running
         CPU time:       2.5s
         CPU Affinity:   yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
      
         VCPU:           1
         CPU:            12
         State:          running
         CPU time:       0.9s
         CPU Affinity:   yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
      
         VCPU:           2
         CPU:            30
         State:          running
         CPU time:       1.5s
         CPU Affinity:   yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
      
         VCPU:           3
         CPU:            13
         State:          running
         CPU time:       1.7s
         CPU Affinity:   yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
      
      This patch fixes this problem.
      Signed-off-by: NTaku Izumi <izumi.taku@jp.fujitsu.com>
      d5f3320d
    • M
      Fix dlopen dependency · bfbeafbd
      Matthias Bolte 提交于
      Since the addition of the lock manager framework in 6a943419
      dlopen is always required, but the checks in configure wasn't changed
      to reflect that. This didn't show up directly because the VirtualBox
      driver linking dlopen in covered it. But disabling the VirtualBox
      driver makes the build fail due to missing dlopen.
      
      Change the dlopen check in configure to pick up dlopen when available.
      
      Reported by Ruben Kerkhof.
      bfbeafbd
    • H
      Deprecate several CURRENT/LIVE/CONFIG enums · fbd7820b
      Hu Tao 提交于
      This patch deprecates following enums:
      
      VIR_DOMAIN_MEM_CURRENT
      VIR_DOMAIN_MEM_LIVE
      VIR_DOMAIN_MEM_CONFIG
      
      VIR_DOMAIN_VCPU_LIVE
      VIR_DOMAIN_VCPU_CONFIG
      
      VIR_DOMAIN_DEVICE_MODIFY_CURRENT
      VIR_DOMAIN_DEVICE_MODIFY_LIVE
      VIR_DOMAIN_DEVICE_MODIFY_CONFIG
      
      And modify internal codes to use virDomainModificationImpact.
      fbd7820b
    • S
      qemu: Faster response time to qemu startup errors · f5358fdc
      Stefan Berger 提交于
      The below patch decreases the response time of libvirt to errors reported by Qemu upon startup by checking whether the qemu process is still alive while polling for the local socket to show up.
      
      This patch also introduces a special handling of signal for the Win32 part of virKillProcess.
      f5358fdc
    • E
      build: update to latest gnulib · 765da152
      Eric Blake 提交于
      * .gnulib: Update to latest, for more strerror_r fixes.
      765da152
  2. 13 6月, 2011 15 次提交
  3. 10 6月, 2011 3 次提交
  4. 08 6月, 2011 8 次提交
    • E
      virt-aa-helper: add missing include · 7444f860
      Eric Blake 提交于
      Regression introduced in commit 02e86910.
      
      * src/security/virt-aa-helper.c (includes): Reflect move of virRun.
      7444f860
    • E
      daemon: plug memory leak · f17eeede
      Eric Blake 提交于
      Detected by Coverity.  Commit ef21beda was incomplete; it solved
      a leak one one path, but not on the other.
      
      * daemon/libvirtd.c (qemudSetLogging): Avoid leak on success.
      f17eeede
    • E
      build: break some long lines · d7814b21
      Eric Blake 提交于
      As long as I was already touching the function...
      
      * src/qemu/qemu_hotplug.c (qemuDomainChangeGraphics): Line wrap.
      d7814b21
    • E
      qemu: add missing break statement · ddc5b158
      Eric Blake 提交于
      Detected by Coverity.  Bug introduced in commit 9d73efdb (v0.8.8).
      
      * src/qemu/qemu_hotplug.c (qemuDomainChangeGraphics): Don't report
      error on success.
      ddc5b158
    • E
      build: silence coverity false positives · 1eca8c3e
      Eric Blake 提交于
      Coverity complained about these intentional fallthrough cases, but
      not about other cases that were explicitly marked with nice comments.
      
      For some reason, Coverity doesn't seem smart enough to parse the
      up-front English comment in virsh about intentional fallthrough :)
      
      * tools/virsh.c (cmdVolSize): Mark fallthrough in a more typical
      fashion.
      * src/conf/nwfilter_conf.c (virNWFilterRuleDefDetailsFormat)
      (virNWFilterRuleDetailsParse): Mark explicit fallthrough.
      1eca8c3e
    • E
      esx: avoid dead code · 657ae229
      Eric Blake 提交于
      Detected by Coverity.  The beginning of the function already filtered
      out NULL objectContentList as invalid.  Further investigation shows:
      
      esxVI_RetrieveProperties is generated and returns a list of objects
      that match the given propertyFilterSpec.
      esxVI_LookupObjectContentByType then tests whether the result
      corresponds to the expected occurrence and reports an error otherwise.
      This simplifies the callers of  esxVI_LookupObjectContentByType, but
      due to the missing dereference the check was never performed because
      the code thought that at least one item was obtained. NULL represents
      an empty list. This is a potential segfault fix because callers of
      esxVI_LookupObjectContentByType that specified "required" occurrence
      assume *objectContentList to be non-NULL when
      esxVI_LookupObjectContentByType succeeds.
      
      * src/esx/esx_vi.c (esxVI_LookupObjectContentByType): Check
      correct pointer.
      657ae229
    • E
      secret: drop dead code · ba4983da
      Eric Blake 提交于
      Detected by Coverity.  The only ways to get to the cleanup label
      were by an early abort (list still unassigned) or after successfully
      transferring list to dest, so there is no list to clean up.
      
      * src/secret/secret_driver.c (loadSecrets): Kill dead code.
      ba4983da
    • E
      qemu: reorder checks for safety · 4eb17d64
      Eric Blake 提交于
      Detected by Coverity.  All existing callers happen to be in
      range, so this isn't too serious.
      
      * src/qemu/qemu_cgroup.c (qemuCgroupControllerActive): Check
      bounds before dereference.
      4eb17d64