1. 27 1月, 2020 1 次提交
    • D
      libvirt: pass a directory path into drivers for embedded usage · 207709a0
      Daniel P. Berrangé 提交于
      The intent here is to allow the virt drivers to be run directly embedded
      in an arbitrary process without interfering with libvirtd. To achieve
      this they need to store all their configuration & state in a separate
      directory tree from the main system or session libvirtd instances.
      
      This can be useful for doing testing of the virt drivers in "make check"
      without interfering with the user's own libvirtd instances.
      
      It can also be used for applications using KVM/QEMU as a piece of
      infrastructure to build an service, rather than for general purpose
      OS hosting. A long standing example is libguestfs, which would prefer
      if its temporary VMs did show up in the main libvirtd VM list, because
      this confuses apps such as OpenStack Nova. A more recent example would
      be Kata which is using KVM as a technology to build containers.
      Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
      Reviewed-by: NCole Robinson <crobinso@redhat.com>
      Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
      207709a0
  2. 03 1月, 2020 1 次提交
  3. 20 12月, 2019 1 次提交
  4. 10 12月, 2019 1 次提交
  5. 13 11月, 2019 1 次提交
  6. 12 11月, 2019 1 次提交
  7. 25 10月, 2019 1 次提交
  8. 21 10月, 2019 3 次提交
  9. 16 10月, 2019 1 次提交
  10. 15 10月, 2019 2 次提交
  11. 27 8月, 2019 1 次提交
  12. 09 8月, 2019 1 次提交
  13. 15 7月, 2019 1 次提交
  14. 11 7月, 2019 1 次提交
    • D
      nodedev: acquire a pidfile in the driver root directory · 3e846a16
      Daniel P. Berrangé 提交于
      When we allow multiple instances of the driver for the same user
      account, using a separate root directory, we need to ensure mutual
      exclusion. Use a pidfile to guarantee this.
      
      In privileged libvirtd this ends up locking
      
         /var/run/libvirt/nodedev/driver.pid
      
      In unprivileged libvirtd this ends up locking
      
        /run/user/$UID/libvirt/nodedev/run/driver.pid
      
      NB, the latter can vary depending on $XDG_RUNTIME_DIR
      Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
      3e846a16
  15. 16 5月, 2019 1 次提交
  16. 15 5月, 2019 1 次提交
  17. 22 3月, 2019 1 次提交
  18. 18 3月, 2019 1 次提交
  19. 21 2月, 2019 2 次提交
  20. 14 2月, 2019 1 次提交
  21. 04 2月, 2019 1 次提交
  22. 14 12月, 2018 1 次提交
    • 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
  23. 05 11月, 2018 1 次提交
    • J
      nodedev: Document the udevEventHandleThread · 29183778
      John Ferlan 提交于
      Commit cdbe1332 neglected to document the API. So let's add some
      details about the algorithm and why it was used to help future
      readers understand the issues encountered.
      
      NB: Management of the processing udev device notification is a
      delicate balance between the udev process, the scheduler, and when
      exactly the data from/for the socket is received. The balance is
      particularly important for environments when multiple devices are
      added into the system more or less simultaneously such as is done
      for mdev or SRIOV. In these cases old libudev blocking on the udev
      recv() occurs more frequently. It's expected that future devices
      will follow similar algorithms. Even though the algorithm does
      present some challenges for older OS's (such as Centos 6), trying
      to rewrite the algorithm to fit both models would be more complex
      and involve pulling the monitor object out of the private data
      lockable object and would need to be guarded by a separate lock.
      Devising such an algorithm to work around issues with older OS's
      at the expense of more modern OS algorithms in newer event processing
      code may result in unexpected issues, so the choice is to encourage
      use of newer OS's with newer udev event processing code.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      Reviewed-by: NErik Skultety <eskultet@redhat.com>
      29183778
  24. 12 6月, 2018 1 次提交
  25. 18 4月, 2018 1 次提交
    • M
      virobject: Introduce VIR_CLASS_NEW() macro · 10f94828
      Michal Privoznik 提交于
      So far we are repeating the following lines over and over:
      
        if (!(virSomeObjectClass = virClassNew(virClassForObject(),
                                   "virSomeObject",
                                   sizeof(virSomeObject),
                                   virSomeObjectDispose)))
            return -1;
      
      While this works, it is impossible to do some checking. Firstly,
      the class name (the 2nd argument) doesn't match the name in the
      code in all cases (the 3rd argument). Secondly, the current style
      is needlessly verbose. This commit turns example into following:
      
        if (!(VIR_CLASS_NEW(virSomeObject,
                            virClassForObject)))
            return -1;
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
      10f94828
  26. 12 4月, 2018 2 次提交
  27. 01 2月, 2018 1 次提交
  28. 29 1月, 2018 3 次提交
  29. 04 1月, 2018 1 次提交
  30. 24 11月, 2017 1 次提交
  31. 03 11月, 2017 1 次提交
    • A
      Remove backslash alignment attempts · 3e7db8d3
      Andrea Bolognani 提交于
      Right-aligning backslashes when defining macros or using complex
      commands in Makefiles looks cute, but as soon as any changes is
      required to the code you end up with either distractingly broken
      alignment or unnecessarily big diffs where most of the changes
      are just pushing all backslashes a few characters to one side.
      
      Generated using
      
        $ git grep -El '[[:blank:]][[:blank:]]\\$' | \
          grep -E '*\.([chx]|am|mk)$$' | \
          while read f; do \
            sed -Ei 's/[[:blank:]]*[[:blank:]]\\$/ \\/g' "$f"; \
          done
      Signed-off-by: NAndrea Bolognani <abologna@redhat.com>
      3e7db8d3
  32. 19 10月, 2017 2 次提交