1. 25 6月, 2015 8 次提交
  2. 22 6月, 2015 2 次提交
  3. 29 5月, 2015 1 次提交
    • L
      node_device: more informative error log when device isn't found · 06a18bc8
      Laine Stump 提交于
      In a couple of cases, the node device driver (and the test node device
      driver which likely copied it) was only logging "Node device not
      found" when it couldn't find the requested device. This patch changes
      those cases to log the name (and in the case when it's relevant, the
      wwnn and wwpn) as well.
      06a18bc8
  4. 18 5月, 2015 1 次提交
    • L
      conf: make virNodeDevCapData an official type · ffc40b63
      Laine Stump 提交于
      For some reason a union (_virNodeDevCapData) that had only been
      declared inside the toplevel struct virNodeDevCapsDef was being used
      as an argument to functions all over the place. Since it was only a
      union, the "type" attribute wasn't necessarily sent with it. While
      this works, it just seems wrong.
      
      This patch creates a toplevel typedef for virNodeDevCapData and
      virNodeDevCapDataPtr, making it a struct that has the type attribute
      as a member, along with an anonymous union of everything that used to
      be in union _virNodeDevCapData. This way we only have to change the
      following:
      
        s/union _virNodeDevCapData */virNodeDevCapDataPtr /
      
      and
      
        s/caps->type/caps->data.type/
      
      This will make me feel less guilty when adding functions that need a
      pointer to one of these.
      ffc40b63
  5. 24 4月, 2015 1 次提交
  6. 21 4月, 2015 3 次提交
  7. 02 4月, 2015 1 次提交
    • J
      Remove unused macros · a0482396
      Ján Tomko 提交于
      In the order of appearance:
      
      * MAX_LISTEN - never used
        added by 23ad665c (qemud) and addec57 (lock daemon)
      
      * NEXT_FREE_CLASS_ID - never used, added by 07d1b6b5
      
      * virLockError - never used, added by eb8268a4
      
      * OPENVZ_MAX_ARG, CMDBUF_LEN, CMDOP_LEN
        unused since the removal of ADD_ARG_LIT in d8b31306
      
      * QEMU_NB_PER_CPU_STAT_PARAM - unused since 897808e7
      
      * QEMU_CMD_PROMPT, QEMU_PASSWD_PROMPT - unused since 1dc10a7b
      
      * TEST_MODEL_WORDSIZE - unused since c25c18f7
      
      * TEMPDIR - never used, added by 714bef5b
      
      * NSIG - workaround around old headers
        added by commit 60ed1d2a
        unused since virExec was moved by commit 02e86910
      
      * DO_TEST_PARSE - never used, added by 9afa0060
      
      * DIFF_MSEC, GETTIMEOFDAY - unused since eee6eb66
      a0482396
  8. 23 3月, 2015 1 次提交
    • M
      network_conf: Drop virNetworkObjIsDuplicate · d9706aea
      Michal Privoznik 提交于
      This function does not make any sense now, that network driver is
      (almost) dropped. I mean, previously, when threads were
      serialized, this function was there to check, if no other network
      with the same name or UUID exists. However, nowadays that threads
      can run more in parallel, this function is useless, in fact it
      gives misleading return values. Consider the following scenario.
      Two threads, both trying to define networks with same name but
      different UUID (e.g. because it was generated during XML parsing
      phase, whatever). Lets assume that both threads are about to call
      networkValidate() which immediately calls
      virNetworkObjIsDuplicate().
      
      T1: calls virNetworkObjIsDuplicate() and since no network with
      given name or UUID exist, success is returned.
      T2: calls virNetworkObjIsDuplicate() and since no network with
      given name or UUID exist, success is returned.
      
      T1: calls virNetworkAssignDef() and successfully places its
      network into the virNetworkObjList.
      T2: calls virNetworkAssignDef() and since network with the same
      name exists, the network definition is replaced.
      
      Okay, this is mainly because virNetworkAssignDef() does not check
      whether name and UUID matches. Well, lets make it so! And drop
      useless function too.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      d9706aea
  9. 16 3月, 2015 1 次提交
    • P
      conf: Replace access to def->mem.max_balloon with accessor functions · 4f9907cd
      Peter Krempa 提交于
      As there are two possible approaches to define a domain's memory size -
      one used with legacy, non-NUMA VMs configured in the <memory> element
      and per-node based approach on NUMA machines - the user needs to make
      sure that both are specified correctly in the NUMA case.
      
      To avoid this burden on the user I'd like to replace the NUMA case with
      automatic totaling of the memory size. To achieve this I need to replace
      direct access to the virDomainMemtune's 'max_balloon' field with
      two separate getters depending on the desired size.
      
      The two sizes are needed as:
      1) Startup memory size doesn't include memory modules in some
      hypervisors.
      2) After startup these count as the usable memory size.
      
      Note that the comments for the functions are future aware and document
      state that will be present after a few later patches.
      4f9907cd
  10. 13 3月, 2015 1 次提交
  11. 11 3月, 2015 3 次提交
  12. 09 3月, 2015 2 次提交
  13. 04 3月, 2015 5 次提交
  14. 02 3月, 2015 1 次提交
  15. 27 1月, 2015 1 次提交
    • D
      Removing probing of secondary drivers · 55ea7be7
      Daniel P. Berrange 提交于
      For stateless, client side drivers, it is never correct to
      probe for secondary drivers. It is only ever appropriate to
      use the secondary driver that is associated with the
      hypervisor in question. As a result the ESX & HyperV drivers
      have both been forced to do hacks where they register no-op
      drivers for the ones they don't implement.
      
      For stateful, server side drivers, we always just want to
      use the same built-in shared driver. The exception is
      virtualbox which is really a stateless driver and so wants
      to use its own server side secondary drivers. To deal with
      this virtualbox has to be built as 3 separate loadable
      modules to allow registration to work in the right order.
      
      This can all be simplified by introducing a new struct
      recording the precise set of secondary drivers each
      hypervisor driver wants
      
      struct _virConnectDriver {
          virHypervisorDriverPtr hypervisorDriver;
          virInterfaceDriverPtr interfaceDriver;
          virNetworkDriverPtr networkDriver;
          virNodeDeviceDriverPtr nodeDeviceDriver;
          virNWFilterDriverPtr nwfilterDriver;
          virSecretDriverPtr secretDriver;
          virStorageDriverPtr storageDriver;
      };
      
      Instead of registering the hypervisor driver, we now
      just register a virConnectDriver instead. This allows
      us to remove all probing of secondary drivers. Once we
      have chosen the primary driver, we immediately know the
      correct secondary drivers to use.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      55ea7be7
  16. 16 1月, 2015 1 次提交
  17. 14 1月, 2015 1 次提交
    • D
      Give virDomainDef parser & formatter their own flags · 0ecd6851
      Daniel P. Berrange 提交于
      The virDomainDefParse* and virDomainDefFormat* methods both
      accept the VIR_DOMAIN_XML_* flags defined in the public API,
      along with a set of other VIR_DOMAIN_XML_INTERNAL_* flags
      defined in domain_conf.c.
      
      This is seriously confusing & error prone for a number of
      reasons:
      
       - VIR_DOMAIN_XML_SECURE, VIR_DOMAIN_XML_MIGRATABLE and
         VIR_DOMAIN_XML_UPDATE_CPU are only relevant for the
         formatting operation
       - Some of the VIR_DOMAIN_XML_INTERNAL_* flags only apply
         to parse or to format, but not both.
      
      This patch cleanly separates out the flags. There are two
      distint VIR_DOMAIN_DEF_PARSE_* and VIR_DOMAIN_DEF_FORMAT_*
      flags that are used by the corresponding methods. The
      VIR_DOMAIN_XML_* flags received via public API calls must
      be converted to the VIR_DOMAIN_DEF_FORMAT_* flags where
      needed.
      
      The various calls to virDomainDefParse which hardcoded the
      use of the VIR_DOMAIN_XML_INACTIVE flag change to use the
      VIR_DOMAIN_DEF_PARSE_INACTIVE flag.
      0ecd6851
  18. 13 1月, 2015 1 次提交
  19. 19 11月, 2014 1 次提交
    • E
      maint: forbid 'int foo = true' · eb909376
      Eric Blake 提交于
      I noticed this while working on qemuDomainGetBlockInfo.  Assigning
      a bool value to an int variable compiles fine, but raises red flags
      on the maintenance front as it becomes too easy to assign -1 or 2
      or any other non-bool value to the same variable.
      
      * cfg.mk (sc_prohibit_int_assign_bool): New rule.
      * src/conf/snapshot_conf.c (virDomainSnapshotRedefinePrep): Fix
      offenders.
      * src/qemu/qemu_driver.c (qemuDomainGetBlockInfo)
      (qemuDomainSnapshotCreateXML): Likewise.
      * src/test/test_driver.c (testDomainSnapshotAlignDisks):
      Likewise.
      * src/util/vircgroup.c (virCgroupSupportsCpuBW): Likewise.
      * src/util/virpci.c (virPCIDeviceBindToStub): Likewise.
      * src/util/virutil.c (virIsCapableVport): Likewise.
      * tools/virsh-domain-monitor.c (cmdDomMemStat): Likewise.
      * tools/virsh-domain.c (cmdBlockResize, cmdScreenshot)
      (cmdInjectNMI, cmdSendKey, cmdSendProcessSignal)
      (cmdDetachInterface): Likewise.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      eb909376
  20. 15 11月, 2014 1 次提交
  21. 07 11月, 2014 1 次提交
  22. 29 10月, 2014 1 次提交
    • E
      maint: avoid static zero init in drivers · ec81cf89
      Eric Blake 提交于
      C guarantees that static variables are zero-initialized.  Some older
      compilers (and also gcc -fno-zero-initialized-in-bss) create larger
      binaries if you explicitly zero-initialize a static variable.
      
      * src/libxl/libxl_driver.c: Fix initialization.
      * src/lxc/lxc_controller.c: Likewise.
      * src/openvz/openvz_util.c (openvzKBPerPages): Likewise.
      * src/phyp/phyp_driver.c: Likewise.
      * src/remote/remote_driver.c: Likewise.
      * src/test/test_driver.c: Likewise.
      * src/uml/uml_driver.c: Likewise.
      * src/vbox/vbox_XPCOMCGlue.c: Likewise.
      * src/vbox/vbox_tmpl.c: Likewise.
      * src/xen/xen_driver.c: Likewise.
      * src/xen/xen_hypervisor.c: Likewise.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      ec81cf89
  23. 23 10月, 2014 1 次提交