1. 18 5月, 2017 6 次提交
  2. 10 4月, 2017 1 次提交
  3. 02 5月, 2016 2 次提交
    • M
      virnetclientstream: Process stream messages later · 18944b7a
      Michal Privoznik 提交于
      There are two functions on the client that handle incoming stream
      data.  The first one virNetClientStreamQueuePacket() is a low
      level function that just processes the incoming stream data from
      the socket and stores it into an internal structure. This happens
      in the client event loop therefore the shorter the callbacks are,
      the better. The second function virNetClientStreamRecvPacket()
      then handles copying data from internal structure into a client
      provided buffer.
      Change introduced in this commit makes just that: new queue for
      incoming stream packets is introduced. Then instead of copying
      data into intermediate internal buffer and then copying them into
      user buffer, incoming stream messages are queue into the queue
      and data is copied just once - in the upper layer function
      virNetClientStreamRecvPacket(). In the end, there's just one
      copying of data and therefore shorter event loop callback. This
      should boost the performance which has proven to be the case in
      my testing.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      18944b7a
    • M
      Revert "rpc: Fix slow volume download (virsh vol-download)" · 435ee578
      Michal Privoznik 提交于
      This reverts commit d9c9e138.
      
      Unfortunately, things are going to be handled differently so this
      commit must go.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      435ee578
  4. 23 9月, 2015 1 次提交
  5. 03 8月, 2015 1 次提交
  6. 25 3月, 2014 1 次提交
  7. 18 3月, 2014 1 次提交
  8. 10 7月, 2013 1 次提交
  9. 16 1月, 2013 2 次提交
  10. 21 12月, 2012 5 次提交
  11. 21 9月, 2012 1 次提交
  12. 07 8月, 2012 1 次提交
  13. 23 7月, 2012 1 次提交
    • O
      Desert the FSF address in copyright · f9ce7dad
      Osier Yang 提交于
      Per the FSF address could be changed from time to time, and GNU
      recommends the following now: (http://www.gnu.org/licenses/gpl-howto.html)
      
        You should have received a copy of the GNU General Public License
        along with Foobar.  If not, see <http://www.gnu.org/licenses/>.
      
      This patch removes the explicit FSF address, and uses above instead
      (of course, with inserting 'Lesser' before 'General').
      
      Except a bunch of files for security driver, all others are changed
      automatically, the copyright for securify files are not complete,
      that's why to do it manually:
      
        src/security/security_selinux.h
        src/security/security_driver.h
        src/security/security_selinux.c
        src/security/security_apparmor.h
        src/security/security_apparmor.c
        src/security/security_driver.c
      f9ce7dad
  14. 18 7月, 2012 1 次提交
  15. 04 6月, 2012 1 次提交
  16. 12 1月, 2012 1 次提交
    • M
      stream: Check for stream EOF · 833b901c
      Michal Privoznik 提交于
      If client stream does not have any data to sink and neither received
      EOF, a dummy packet is sent to the daemon signalising client is ready to
      sink some data. However, after we added event loop to client a race may
      occur:
      
      Thread 1 calls virNetClientStreamRecvPacket and since no data are cached
      nor stream has EOF, it decides to send dummy packet to server which will
      sent some data in turn. However, during this decision and actual message
      exchange with server -
      
      Thread 2 receives last stream data from server. Therefore an EOF is set
      on stream and if there is a call waiting (which is not yet) it is woken
      up. However, Thread 1 haven't sent anything so far, so there is no call
      to be woken up. So this thread sent dummy packet to daemon, which
      ignores that as no stream is associated with such packet and therefore
      no reply will ever come.
      
      This race causes client to hang indefinitely.
      833b901c
  17. 16 11月, 2011 1 次提交
    • D
      Split virNetClientSend into 2 methods · 5990f227
      Daniel P. Berrange 提交于
      Stop multiplexing virNetClientSend for two different purposes,
      instead add virNetClientSendWithReply and virNetClientSendNoReply
      
      * src/rpc/virnetclient.c, src/rpc/virnetclient.h: Replace
        virNetClientSend with virNetClientSendWithReply and
        virNetClientSendNoReply
      * src/rpc/virnetclientprogram.c, src/rpc/virnetclientstream.c:
        Update for new API names
      5990f227
  18. 11 10月, 2011 1 次提交
  19. 23 9月, 2011 1 次提交
    • D
      Fix synchronous reading of stream data · cb610092
      Daniel P. Berrange 提交于
      commit 984840a2 removed the
      notification of waiting calls when VIR_NET_CONTINUE messages
      arrive. This was to fix the case of a virStreamAbort() call
      being prematurely notified of completion.
      
      The problem is that sometimes there are dummy calls from a
      virStreamRecv() call waiting that *do* need to be notified.
      
      These dummy calls should have a status VIR_NET_CONTINUE. So
      re-add the notification upon VIR_NET_CONTINUE, but only if
      the waiter also has a status of VIR_NET_CONTINUE.
      
      * src/rpc/virnetclient.c: Notify waiting call if stream data
        arrives
      * src/rpc/virnetclientstream.c:  Mark dummy stream read packet
        with status VIR_NET_CONTINUE
      cb610092
  20. 01 9月, 2011 1 次提交
    • D
      Fix tracking of RPC messages wrt streams · b3fb288e
      Daniel P. Berrange 提交于
      Commit 2c85644b attempted to
      fix a problem with tracking RPC messages from streams by doing
      
      -            if (msg->header.type == VIR_NET_REPLY) {
      +            if (msg->header.type == VIR_NET_REPLY ||
      +                (msg->header.type == VIR_NET_STREAM &&
      +                 msg->header.status != VIR_NET_CONTINUE)) {
                       client->nrequests--;
      
      In other words any stream packet, with status NET_OK or NET_ERROR
      would cause nrequests to be decremented. This is great if the
      packet from from a synchronous virStreamFinish or virStreamAbort
      API call, but wildly wrong if from a server initiated abort.
      The latter resulted in 'nrequests' being decremented below zero.
      This then causes all I/O for that client to be stopped.
      
      Instead of trying to infer whether we need to decrement the
      nrequests field, from the message type/status, introduce an
      explicit 'bool tracked' field to mark whether the virNetMessagePtr
      object is subject to tracking.
      
      Also add a virNetMessageClear function to allow a message
      contents to be cleared out, without adversely impacting the
      'tracked' field as a naive memset() would do
      
      * src/rpc/virnetmessage.c, src/rpc/virnetmessage.h: Add
        a 'bool tracked' field and virNetMessageClear() API
      * daemon/remote.c, daemon/stream.c, src/rpc/virnetclientprogram.c,
        src/rpc/virnetclientstream.c, src/rpc/virnetserverclient.c,
        src/rpc/virnetserverprogram.c: Switch over to use
        virNetMessageClear() and pass in the 'bool tracked' value
        when creating messages.
      b3fb288e
  21. 08 7月, 2011 1 次提交
    • D
      Fix leak of 'msg' object in client stream code · 927dfcf6
      Daniel P. Berrange 提交于
      In one exit path we forgot to free the virNetMessage object causing
      a large memory leak for streams which send a lot of data. Some other
      paths were calling VIR_FREE directly instead of virNetMessageFree
      although this was (currently) harmless.
      
      * src/rpc/virnetclientstream.c: Fix leak of msg object
      * src/rpc/virnetclientprogram.c: Call virNetMessageFree instead
        of VIR_FREE
      927dfcf6
  22. 29 6月, 2011 3 次提交
  23. 24 6月, 2011 1 次提交
    • D
      Introduce generic RPC client objects · 434de30d
      Daniel P. Berrange 提交于
      To facilitate creation of new clients using XDR RPC services,
      pull alot of the remote driver code into a set of reusable
      objects.
      
       - virNetClient: Encapsulates a socket connection to a
         remote RPC server. Handles all the network I/O for
         reading/writing RPC messages. Delegates RPC encoding
         and decoding to the registered programs
      
       - virNetClientProgram: Handles processing and dispatch
         of RPC messages for a single RPC (program,version).
         A program can register to receive async events
         from a client
      
       - virNetClientStream: Handles generic I/O stream
         integration to RPC layer
      
      Each new client program now merely needs to define the list of
      RPC procedures & events it wants and their handlers. It does
      not need to deal with any of the network I/O functionality at
      all.
      434de30d