1. 28 8月, 2014 32 次提交
  2. 27 8月, 2014 8 次提交
    • M
      conf: fix leak with def->mem.hugepages · a6a210b8
      Martin Kletzander 提交于
      Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
      a6a210b8
    • M
      vbox: Register per partes · dbb4cbf5
      Michal Privoznik 提交于
      Since times when vbox moved to the daemon (due to some licensing
      issue) the subdrivers that vbox implements were registered, but not
      opened since our generic subdrivers took priority. I've tried to fix
      this in 65b7d553 but it was not correct. Apparently moving
      vbox driver registration upfront changes the default connection URI
      which makes some users sad. So, this commit breaks vbox into pieces
      and register vbox's network and storage drivers first, and vbox driver
      then at the end. This way, the vbox driver is registered in the order
      it always was, but its subdrivers are registered prior the generic
      ones.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
      dbb4cbf5
    • M
      virDriverLoadModule: Honor libvirt func name tranlsation · 27d59ab7
      Michal Privoznik 提交于
      There's this unwritten rule in libvirt that vir_function is translated
      into virFunction when needed (e.g. in remote protocol definition,
      python, ...). Up till now we ignored such translation in driver module
      loading and did fine. Well, we didn't have any module with an
      underscore in its name. But this will change in next commit. The
      problem is, once an a module is dlopen()-ed, we derive register
      function name from its name. So instead of "driver_subdriverRegister"
      do some magic to turn that into "driverSubdriverRegister".
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      27d59ab7
    • M
      virdrivermoduletest: Test all the modules · 5feaef17
      Michal Privoznik 提交于
      Even though we kept adding new and new modules (e.g. vbox or bhyve)
      the test wasn't updated. Do that now. Moreover, while it's not
      crucial, it's nice to reorder test cases to match the order in which
      the daemon loads the modules.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      5feaef17
    • E
      domain_conf: fix internal flag verification · 79f4c4e6
      Eric Blake 提交于
      While working on virDomainBlockCopy, I noticed we had a verify()
      concerning internal XML flags that was incomplete after several
      recent flag additions; move that up higher in the code to make it
      harder to forget to modify on the next flag addition.  Adjust
      some formatting while at it.
      
      * src/conf/domain_conf.c (verify): Move closer to internal flag
      definitions.  Cover missing flags ALLOW_ROM and ALLOW_BOOT.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      79f4c4e6
    • E
      virsh: drop unused variable · 1db2f4f7
      Eric Blake 提交于
      While prepping for virDomainBlockJob patches, I found some dead code.
      
      * tools/virsh-domain.c (blockJobImpl): Kill unused 'name'.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      1db2f4f7
    • J
      qemu: call endjob in RevertToSnapshot · 03b994fa
      Jincheng Miao 提交于
      In qemuDomainRevertToSnapshot(), it will check snap->def->state.
      But when the state is PMSUSPENDED/NOSTATE/BLOCKED, it forgets to
      call qemuDomainObjEndJob.
      
      https://bugzilla.redhat.com/show_bug.cgi?id=1134154
      Bug introduced in commit 1e833899.
      Signed-off-by: NJincheng Miao <jmiao@redhat.com>
      Signed-off-by: NEric Blake <eblake@redhat.com>
      03b994fa
    • E
      API: Tweak virDomainOpenGraphics to return fd directly · b259e459
      Eric Blake 提交于
      Let's fix this before we bake in a painful API.  Since we know
      that we have exactly one non-negative fd on success, we might
      as well return the fd directly instead of forcing the user to
      pass in a pointer.  Furthermore, I found some memory and fd
      leaks while reviewing the code - the idea is that on success,
      libvirtd will have handed two fds in two different directions:
      one to qemu, and one to the RPC client.
      
      * include/libvirt/libvirt.h.in (virDomainOpenGraphicsFD): Drop
      unneeded parameter.
      * src/driver.h (virDrvDomainOpenGraphicsFD): Likewise.
      * src/libvirt.c (virDomainOpenGraphicsFD): Adjust interface to
      return fd directly.
      * daemon/remote.c (remoteDispatchDomainOpenGraphicsFd): Adjust
      semantics.
      * src/qemu/qemu_driver.c (qemuDomainOpenGraphicsFD): Likewise,
      and plug fd leak.
      * src/remote/remote_driver.c (remoteDomainOpenGraphicsFD):
      Likewise, and plug memory and fd leak.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      b259e459