1. 25 3月, 2013 4 次提交
    • O
      util: Add one helper virReadFCHost to read the value of fc_host entry · 244ce462
      Osier Yang 提交于
      "open_wwn_file" in node_device_linux_sysfs.c is redundant, on one
      hand it duplicates work of virFileReadAll, on the other hand, it's
      waste to use a function for it, as there is no other users of it.
      So I don't see why the file opening work cannot be done in
      "read_wwn_linux".
      
      "read_wwn_linux" can be abstracted as an util function. As what all
      it does is to read the sysfs entry.
      
      So this patch removes "open_wwn_file", and abstract "read_wwn_linux"
      as an util function "virReadFCHost" (a more general name, because
      after changes, it can read each of the fc_host entry now).
      
      * src/util/virutil.h: (Declare virReadFCHost)
      * src/util/virutil.c: (Implement virReadFCHost)
      * src/node_device/node_device_linux_sysfs.c: (Remove open_wwn_file,
        and read_wwn_linux)
      src/node_device/node_device_driver.h: (Remove the declaration of
        read_wwn_linux, and the related macros)
      src/libvirt_private.syms: (Export virReadFCHost)
      244ce462
    • O
      nodedev: Introduce two new flags for listAll API · 652a2ec6
      Osier Yang 提交于
      VIR_CONNECT_LIST_NODE_DEVICES_CAP_FC_HOST to filter the FC HBA,
      and VIR_CONNECT_LIST_NODE_DEVICES_CAP_VPORTS to filter the FC HBA
      which supports vport.
      652a2ec6
    • O
      nodedev: Remove the unused enum · ab4b0001
      Osier Yang 提交于
      Guess it was created for the fc_host and vports_ops capabilities
      purpose, but there is enum virNodeDevScsiHostCapFlags for them,
      and enum virNodeDevHBACapType is unused, and actually both
      VIR_ENUM_DECL and VIR_ENUM_IMPL use the wrong enum name
      "virNodeDevHBACap".
      ab4b0001
    • P
      virsh: Fix docs for "virsh setmaxmem" · b88831f7
      Peter Krempa 提交于
      The docs assumed the command works always for QEMU and other
      hypervisors. As this is done using the balloon mechainism live increase
      of the maximum memory limit isn't supported. Fix the docs to mention
      this limitation.
      b88831f7
  2. 23 3月, 2013 6 次提交
  3. 22 3月, 2013 16 次提交
  4. 21 3月, 2013 14 次提交
    • P
      03122d7b
    • P
    • P
      virsh-snapshot: Refactor cmdSnapshotCurrent · 4baf00fc
      Peter Krempa 提交于
      Use the exclusive parameter checker and touch up some parts to simplify
      code.
      4baf00fc
    • P
      virsh-domain: Fix flag name in error message to match the check · 020e2103
      Peter Krempa 提交于
      The check is done on the "--paused" flag but the error message stated
      "--saved"
      020e2103
    • P
      virsh-host: Refactor cmdFreecell · ccb69210
      Peter Krempa 提交于
      Use the new helpers to determine mutually exclusive options and touch up
      some parts to simplify the code.
      ccb69210
    • P
      virsh-snapshot: Refactor virsh snapshot-list · 55b3b15c
      Peter Krempa 提交于
      Simplify error handling and mutually exclusive option checking.
      55b3b15c
    • P
      virsh: Introduce macros to reject mutually exclusive arguments · 7e437ee7
      Peter Krempa 提交于
      This patch adds three macros to the virsh source tree that help to
      easily check for mutually exclusive parameters.
      
      VSH_EXCLUSIVE_OPTIONS_EXPR has four arguments, two expressions to check
      and two names of the parameters to print in the message.
      
      VSH_EXCLUSIVE_OPTIONS is more specific and check the command structure
      for the parameters using vshCommandOptBool.
      
      VSH_EXCLUSIVE_OPTIONS_VAR is meant to check boolean variables with the
      same name as the parameters.
      7e437ee7
    • P
      python: Fix emulatorpin API bindings · d395c811
      Peter Krempa 提交于
      The addition of emulator pinning APIs didn't think of doing the right
      job with python APIs for them. The default generator produced unusable
      code for this.
      
      This patch switches to proper code as in the case of domain Vcpu pining.
      This change can be classified as a python API-breaker but in the state
      the code was before I doubt anyone was able to use it successfully.
      d395c811
    • P
      qemu: Un-mark volume as mirrored/copied if blockjob copy fails · a584eaa5
      Peter Krempa 提交于
      When the blockjob fails for some reason an event is emitted but the disk
      wasn't unmarked as being part of a active block copy operation.
      a584eaa5
    • D
      Fix initialization of virIdentityPtr thread locals · 6e5ad189
      Daniel P. Berrange 提交于
      Some code mistakenly called virIdentityOnceInit directly
      instead of virIdentityInitialize(). This meant that one-time
      initializer was run many times with predictably bad results.
      6e5ad189
    • M
      qemu: s/VIR_ERR_NO_SUPPORT/VIR_ERR_OPERATION_UNSUPPORTED · cb86e9d3
      Michal Privoznik 提交于
      The VIR_ERR_NO_SUPPORT error code is reserved for cases where an
      API is not implemented in a driver. It definitely should not be
      used when an API execution fails due to unsupported operation.
      cb86e9d3
    • D
      Fix linkage of virt-aa-helper with numa library · e053561e
      Daniel P. Berrange 提交于
      The recent commit moved some of the use of libnuma out of the
      driver code, and into src/util/. It did not, however, update
      libvirt_util.la to link against libnuma. This caused linkage
      failure with virt-aa-helper, since nothing else caused libnuma
      to be pulled onto the linker command line.
      
      The fix removes all reference to NUMACTL_LIBS/CFLAGS from the
      various modules in src/Makefile.am and just adds them to the
      libvirt_util.la module, which everything else depends on.
      
      Technically a build-breaker fix, but wanted to wait for feedback
      on this
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      e053561e
    • O
      qemu: Add the new disk src into shared disk table when updating disk · 65f61e45
      Osier Yang 提交于
      We should record the new disk src in the shared disk table for
      updating disk (CD-ROM or Floppy) API. Fortunately, we only allow
      to update the disk source now, otherwise we might also want to
      set the unpriv_sgio setting.
      65f61e45
    • G
      python: fix bindings that don't raise an exception · 4b143ab2
      Guannan Ren 提交于
      For example:
       >>> dom.memoryStats()
       libvir: QEMU Driver error : Requested operation is not valid:\
               domain is not running
      
      There are six such python API functions like so.
      The root reason is that generator.py script checks the type of return
      value of a python stub function defined in libvirt-api.xml or
      libvirt-override-api.xml to see whether to add the raise clause or not
      in python wrapper code in libvirt.py.
      
      The type of return value is supposed to be C types.
      For those stub functions which return python non-integer data type like
      string, list, tuple, dictionary, the existing type in functions varies
      from each other which leads problem like this.
      
      Currently, in generator.py, it maintains a buggy whitelist for stub functions
      returning a list type. I think it is easy to forget adding new function name
      in the whitelist.
      
      This patch makes the value of type consistent with C type "char *"
      in libvirt-override-api.xml. For python, any of types could be printed
      as string, so I choose "char *" in this case. And the comment in xml
      could explain it when adding new function definition.
      
            <function name='virNodeGetCPUStats' file='python'>
              ...
       -      <return type='virNodeCPUStats' info='...'/>
       +      <return type='char *' info='...'/>
              ...
            </function>
      4b143ab2