1. 10 4月, 2018 6 次提交
  2. 09 4月, 2018 13 次提交
  3. 07 4月, 2018 4 次提交
    • J
      conf: Fix virDomainObjParseFile object handling · d4aaa165
      John Ferlan 提交于
      When virDomainObjParseFile runs, it returns a locked @obj with
      one reference. Rather than just use virObjectUnref to clean that
      up, use virObjectEndAPI.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      d4aaa165
    • J
      conf: Introduce virDomainObjListAddObjLocked · c534d10f
      John Ferlan 提交于
      Create a common helper to add an object to the locked domain
      objlist hash tables and use it.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      c534d10f
    • J
      conf: Fix error path logic in virDomainObjListLoadStatus · e0f7707c
      John Ferlan 提交于
      If the virHashAddEntry fails, then we need to "careful" about
      how we free the @obj. When virDomainObjParseFile returns there
      is one reference and the object is locked, so use virDomainObjEndAPI
      when done.
      
      Add a virObjectRef in the error path for the second virHashAddEntry
      call since it doesn't call virObjectRef, but virHashRemoveEntry
      will call virObjectUnref because virObjectFreeHashData is called
      when the element is removed from the hash table as set up in
      virDomainObjListNew.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      e0f7707c
    • J
      conf: Fix error path logic in virDomainObjListAddLocked · 2689a922
      John Ferlan 提交于
      If the virHashAddEntry fails, then we need to "careful" about
      how we free the @vm. When virDomainObjNew returns there is one
      reference and the object is locked, so use virDomainObjEndAPI
      when done.
      
      Add a virObjectRef in the error path for the second virHashAddEntry
      call since it doesn't call virObjectRef, but virHashRemoveEntry
      will call virObjectUnref because virObjectFreeHashData is called
      when the element is removed from the hash table as set up in
      virDomainObjListNew.
      
      Eventually these paths should goto error and error should be changed
      to use EndAPI as well, but that requires more adjustments to other
      paths in the code to have a locked and ref counted @vm.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      2689a922
  4. 06 4月, 2018 10 次提交
  5. 05 4月, 2018 2 次提交
    • M
      qemu_cgroup: Handle device mapper targets properly · 6dd84f68
      Michal Privoznik 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=1557769
      
      Problem with device mapper targets is that there can be several
      other devices 'hidden' behind them. For instance, /dev/dm-1 can
      consist of /dev/sda, /dev/sdb and /dev/sdc. Therefore, when
      setting up devices CGroup and namespaces we have to take this
      into account.
      
      This bug was exposed after Linux kernel was fixed. Initially,
      kernel used different functions for getting block device in
      open() and ioctl(). While CGroup permissions were checked in the
      former case, due to a bug in kernel they were not checked in the
      latter case. This changed with the upstream commit of
      519049afead4f7c3e6446028c41e99fde958cc04 (v4.16-rc5~11^2~4).
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      6dd84f68
    • M
      util: Introduce virDevMapperGetTargets · fd9d1e68
      Michal Privoznik 提交于
      This helper fetches dependencies for given device mapper target.
      
      At the same time, we need to provide a dummy log function because
      by default libdevmapper prints out error messages to stderr which
      we need to suppress.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      fd9d1e68
  6. 04 4月, 2018 3 次提交
  7. 03 4月, 2018 2 次提交