1. 23 2月, 2020 6 次提交
  2. 04 2月, 2020 1 次提交
  3. 29 1月, 2020 1 次提交
  4. 24 1月, 2020 1 次提交
    • P
      util: hash: Improve debugability of "Duplicate key" error message · ae60e058
      Peter Krempa 提交于
      If we get a user reporting this error message being shown it's pretty
      useless in terms of actually debugging it since we don't know which hash
      and which key are actually subject to the error.
      
      This patch adds a new hash table callback which formats the
      user-readable version of the hash key and reports it in the new message
      which will look like:
      
      "Duplicate hash table key 'blah'"
      
      That way we will at least have an anchor point where to start the
      search.
      
      There are two special implementations of keys which are numeric so we
      add specific printer functions for them.
      Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
      Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
      ae60e058
  5. 22 11月, 2019 1 次提交
    • D
      util: consolidate on one free callback for hash data · bc7e7291
      Daniel P. Berrangé 提交于
      This previous commit introduced a simpler free callback for
      hash data with only 1 arg, the value to free:
      
        commit 49288fac
        Author: Peter Krempa <pkrempa@redhat.com>
        Date:   Wed Oct 9 15:26:37 2019 +0200
      
          util: hash: Add possibility to use simpler data free function in virHash
      
      It missed two functions in the hash table code which need
      to call the alternate data free function, virHashRemoveEntry
      and virHashRemoveSet.
      
      After the previous patch though, there is no code that
      makes functional use of the 2nd key arg in the data
      free function. There is merely one log message that can
      be dropped.
      
      We can thus purge the current virHashDataFree callback
      entirely, and rename virHashDataFreeSimple to replace
      it.
      Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
      Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
      bc7e7291
  6. 15 11月, 2019 2 次提交
  7. 12 11月, 2019 1 次提交
  8. 21 10月, 2019 2 次提交
  9. 17 10月, 2019 1 次提交
  10. 16 10月, 2019 1 次提交
  11. 15 10月, 2019 1 次提交
  12. 14 10月, 2019 1 次提交
  13. 28 9月, 2019 1 次提交
  14. 25 7月, 2019 3 次提交
  15. 19 7月, 2019 1 次提交
  16. 28 6月, 2019 2 次提交
  17. 26 6月, 2019 2 次提交
  18. 21 6月, 2019 2 次提交
  19. 25 4月, 2019 1 次提交
    • P
      vircgroup: no need to ifdef virCgroupFree · 9470815d
      Pavel Hrdina 提交于
      virCgroup struct is always defined and the free function is not calling
      anything that would require OS supporting cgroups.
      
      This fixes an issue if we try to start a VM with QEMU binary that
      doesn't support QXL.  The start operation will fail in
      qemuProcessStartValidateVideo() which will set correct error message,
      but later in one of the cleanup paths we will call
      qemuDomainObjPrivateDataClear() which always calls virCgroupFree()
      and that will fail on OS that doesn't support cgroups and it will
      set a new error which will be eventually reported to user.
      Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
      9470815d
  20. 12 4月, 2019 1 次提交
  21. 07 2月, 2019 1 次提交
  22. 04 2月, 2019 1 次提交
  23. 14 12月, 2018 3 次提交
    • D
      Enforce a standard header file guard symbol name · 568a4172
      Daniel P. Berrangé 提交于
      Require that all headers are guarded by a symbol named
      
        LIBVIRT_$FILENAME
      
      where $FILENAME is the uppercased filename, with all characters
      outside a-z changed into '_'.
      
      Note we do not use a leading __ because that is technically a
      namespace reserved for the toolchain.
      Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
      568a4172
    • P
      vircgroup: introduce virCgroupKillRecursiveCB · b5325468
      Pavel Hrdina 提交于
      The rewrite to support cgroup v2 missed this function.  In cgroup v2
      we have different files to track tasks.
      
      We would fail to remove cgroup on non-systemd OSes if there is any
      extra process assigned to guest cgroup because we would not kill any
      process form the guest cgroup.
      Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
      b5325468
    • D
      Remove all Author(s): lines from source file headers · 60046283
      Daniel P. Berrangé 提交于
      In many files there are header comments that contain an Author:
      statement, supposedly reflecting who originally wrote the code.
      In a large collaborative project like libvirt, any non-trivial
      file will have been modified by a large number of different
      contributors. IOW, the Author: comments are quickly out of date,
      omitting people who have made significant contribitions.
      
      In some places Author: lines have been added despite the person
      merely being responsible for creating the file by moving existing
      code out of another file. IOW, the Author: lines give an incorrect
      record of authorship.
      
      With this all in mind, the comments are useless as a means to identify
      who to talk to about code in a particular file. Contributors will always
      be better off using 'git log' and 'git blame' if they need to  find the
      author of a particular bit of code.
      
      This commit thus deletes all Author: comments from the source and adds
      a rule to prevent them reappearing.
      
      The Copyright headers are similarly misleading and inaccurate, however,
      we cannot delete these as they have legal meaning, despite being largely
      inaccurate. In addition only the copyright holder is permitted to change
      their respective copyright statement.
      Reviewed-by: NErik Skultety <eskultet@redhat.com>
      Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
      60046283
  24. 05 12月, 2018 1 次提交
  25. 05 10月, 2018 2 次提交
    • P
      vircgroup: add support for hybrid configuration · b79d8585
      Pavel Hrdina 提交于
      This enables to use both cgroup v1 and v2 at the same time together
      with libvirt.  It is supported by kernel and there is valid use-case,
      not all controllers are implemented in cgroup v2 so there might be
      configurations where administrator would enable these missing
      controllers in cgroup v1.
      Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
      b79d8585
    • P
      vircgroup: introduce virCgroupV2MakeGroup · 89f52abd
      Pavel Hrdina 提交于
      When creating cgroup hierarchy we need to enable controllers in the
      parent cgroup in order to be usable.  That means writing "+{controller}"
      into cgroup.subtree_control file.  We can enable only controllers that
      are enabled for parent cgroup, that means we need to do that for the
      whole cgroup tree.
      
      Cgroups for threads needs to be handled differently in cgroup v2.  There
      are two types of controllers:
      
          - domain controllers: these cannot be enabled for threads
          - threaded controllers: these can be enabled for threads
      
      In addition there are multiple types of cgroups:
      
          - domain: normal cgroup
          - domain threaded: a domain cgroup that serves as root for threaded
                             cgroups
          - domain invalid: invalid cgroup, can be changed into threaded, this
                            is the default state if you create subgroup inside
                            domain threaded group or threaded group
          - threaded: threaded cgroup which can have domain threaded or
                      threaded as parent group
      
      In order to create threaded cgroup it's sufficient to write "threaded"
      into cgroup.type file, it will automatically make parent cgroup
      "domain threaded" if it was only "domain".  In case the parent cgroup
      is already "domain threaded" or "threaded" it will modify only the type
      of current cgroup.  After that we can enable threaded controllers.
      Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
      89f52abd