1. 12 4月, 2019 2 次提交
  2. 09 4月, 2019 1 次提交
  3. 03 4月, 2019 2 次提交
  4. 09 2月, 2019 1 次提交
    • N
      rpc: client: stream: fix multi thread abort/finish · d63c82df
      Nikolay Shirokovskiy 提交于
      If 2 threads call abort for example then one of them
      will hang because client will send 2 abort messages and
      server will reply only on first of them, the second will be
      ignored. And on server reply client changes the state only
      one of abort message to complete, the second will hang forever.
      There are other similar issues.
      
      We should complete all messages waiting reply if we got
      error or expected abort/finish reply from server. Also if one
      thread send finish and another abort one of them will win
      the race and server will either abort or finish stream. If
      stream is aborted then thread requested finishing should report
      error. In order to archive this let's keep stream closing reason
      in @closed field. If we receive VIR_NET_OK message for stream
      then stream is finished if oldest (closest to queue end) message
      in stream queue is finish message and stream is aborted if oldest
      message is abort message. Otherwise it is protocol error.
      
      By the way we need to fix case of receiving VIR_NET_CONTINUE
      message. Now we take oldest message in queue and check if
      this is dummy message. If one thread first sends abort and
      second thread then receives data then oldest message is abort
      message and second thread won't be notified when data arrives.
      Let's find oldest dummy message instead.
      Signed-off-by: NNikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      d63c82df
  5. 08 2月, 2019 8 次提交
  6. 04 2月, 2019 1 次提交
  7. 18 1月, 2019 1 次提交
  8. 14 12月, 2018 4 次提交
    • 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
    • D
      Fix many mistakes & inconsistencies in header file layout · 4cfd7090
      Daniel P. Berrangé 提交于
      This introduces a syntax-check script that validates header files use a
      common layout:
      
        /*
         ...copyright header...
         */
        <one blank line>
        #ifndef SYMBOL
        # define SYMBOL
        ....content....
        #endif /* SYMBOL */
      
      For any file ending priv.h, before the #ifndef, we will require a
      guard to prevent bogus imports:
      
        #ifndef SYMBOL_ALLOW
        # error ....
        #endif /* SYMBOL_ALLOW */
        <one blank line>
      
      The many mistakes this script identifies are then fixed.
      Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
      4cfd7090
    • D
      remote: check & report OOM in make_nonnull_XXX methods · dc54b3ec
      Daniel P. Berrangé 提交于
      The make_nonnull_XXX methods can all fail due to OOM but this was being
      silently ignored and thus also not checked by callers. Make the methods
      propagate errors and use ATTRIBUTE_RETURN_CHECK to force callers to deal
      with it.
      Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
      dc54b3ec
    • 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
  9. 15 11月, 2018 3 次提交
  10. 05 11月, 2018 1 次提交
    • J
      access: Modify the VIR_ERR_ACCESS_DENIED to include driverName · ccc72d5c
      John Ferlan 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=1631606
      
      Changes made to manage and utilize a secondary connection
      driver to APIs outside the scope of the primary connection
      driver have resulted in some confusion processing polkit rules
      since the simple "access denied" error message doesn't provide
      enough of a clue when combined with the "authentication failed:
      access denied by policy" as to which connection driver refused
      or failed the ACL check.
      
      In order to provide some context, let's modify the existing
      "access denied" error returne from the various vir*EnsureACL
      API's to provide the connection driver name that is causing
      the failure. This should provide the context for writing the
      polkit rules that would allow access via the driver.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      ACKed-by: NMichal Privoznik <mprivozn@redhat.com>
      ccc72d5c
  11. 31 10月, 2018 1 次提交
  12. 12 10月, 2018 1 次提交
  13. 20 9月, 2018 2 次提交
  14. 16 8月, 2018 1 次提交
  15. 15 8月, 2018 1 次提交
    • M
      rpc: Initialize a worker pool for max_workers=0 as well · 7330d091
      Marc Hartmayer 提交于
      Semantically, there is no difference between an uninitialized worker
      pool and an initialized worker pool with zero workers. Let's allow the
      worker pool to be initialized for max_workers=0 as well then which
      makes the API more symmetric and simplifies code. Validity of the
      worker pool is delegated to virThreadPoolGetMaxWorkers instead.
      
      This patch fixes segmentation faults in
      virNetServerGetThreadPoolParameters and
      virNetServerSetThreadPoolParameters for the case when no worker pool
      is actually initialized (max_workers=0).
      Signed-off-by: NMarc Hartmayer <mhartmay@linux.ibm.com>
      7330d091
  16. 25 7月, 2018 2 次提交
  17. 23 7月, 2018 1 次提交
    • A
      src: Make virStr*cpy*() functions return an int · 6c0d0210
      Andrea Bolognani 提交于
      Currently, the functions return a pointer to the
      destination buffer on success or NULL on failure.
      
      Not only does this kind of error handling look quite
      alien in the context of libvirt, where most functions
      return zero on success and a negative int on failure,
      but it's also somewhat pointless because unless there's
      been a failure the returned pointer will be the same
      one passed in by the user, thus offering no additional
      value.
      
      Change the functions so that they return an int
      instead.
      Signed-off-by: NAndrea Bolognani <abologna@redhat.com>
      6c0d0210
  18. 21 7月, 2018 2 次提交
  19. 26 6月, 2018 2 次提交
  20. 06 6月, 2018 1 次提交
  21. 05 6月, 2018 2 次提交