1. 04 2月, 2016 1 次提交
  2. 26 1月, 2016 1 次提交
  3. 09 12月, 2015 5 次提交
  4. 30 11月, 2015 1 次提交
    • M
      conf: Split virDomainObjList into a separate file · 90f3c0d7
      Michal Privoznik 提交于
      Our domain_conf.* files are big enough. Not only they contain XML
      parsing code, but they served as a storage of all functions whose
      name is virDomain prefixed. This is just wrong as it gathers not
      related functions (and modules) into one big file which is then
      harder to maintain. Split virDomainObjList module into a separate
      file called virdomainobjlist.[ch].
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      90f3c0d7
  5. 24 9月, 2015 3 次提交
  6. 22 9月, 2015 2 次提交
    • P
      conf: Rename max_balloon to total_memory · 8059a990
      Peter Krempa 提交于
      The name of the variable was misleading. Rename it and it's setting
      accessor before other fixes.
      8059a990
    • D
      test driver: don't unlock pool after freeing it · 03cf57a3
      David Mansfield 提交于
       Invalid read of size 4
          at 0x945CA30: __pthread_mutex_unlock_full (in /lib64/libpthread-2.20.so)
          by 0x4F0404B: virMutexUnlock (virthread.c:94)
          by 0x4F7161B: virStoragePoolObjUnlock (storage_conf.c:2603)
          by 0x4FE0476: testStoragePoolUndefine (test_driver.c:4328)
          by 0x4FCF086: virStoragePoolUndefine (libvirt-storage.c:656)
          by 0x15A7F5: cmdPoolUndefine (virsh-pool.c:1721)
          by 0x12F48D: vshCommandRun (vsh.c:1212)
          by 0x132AA7: main (virsh.c:943)
        Address 0xfda56a0 is 16 bytes inside a block of size 104 free'd
          at 0x4C2BA6C: free (vg_replace_malloc.c:473)
          by 0x4EA5C96: virFree (viralloc.c:582)
          by 0x4F70B69: virStoragePoolObjFree (storage_conf.c:412)
          by 0x4F7167B: virStoragePoolObjRemove (storage_conf.c:437)
          by 0x4FE0468: testStoragePoolUndefine (test_driver.c:4323)
          by 0x4FCF086: virStoragePoolUndefine (libvirt-storage.c:656)
          by 0x15A7F5: cmdPoolUndefine (virsh-pool.c:1721)
          by 0x12F48D: vshCommandRun (vsh.c:1212)
          by 0x132AA7: main (virsh.c:943)
      03cf57a3
  7. 24 7月, 2015 1 次提交
  8. 25 6月, 2015 15 次提交
  9. 22 6月, 2015 2 次提交
  10. 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
  11. 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
  12. 24 4月, 2015 1 次提交
  13. 21 4月, 2015 3 次提交
  14. 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
  15. 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
  16. 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