1. 18 5月, 2017 13 次提交
    • M
      Add new flag to daemonCreateClientStream and virNetClientStreamNew · 5f4f9d87
      Michal Privoznik 提交于
      Add a new argument to daemonCreateClientStream in order to allow for
      future expansion to mark that a specific stream can be used to skip
      data, such as the case with sparsely populated files. The new flag will
      be the eventual decision point between client/server to decide whether
      both ends can support and want to use sparse streams.
      
      A new bool 'allowSkip' is added to both _virNetClientStream and
      daemonClientStream in order to perform the tracking.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      5f4f9d87
    • M
      virNetClientStreamNew: Track origin stream · 8b6ffe40
      Michal Privoznik 提交于
      Add a virStreamPtr pointer to the _virNetClientStream
      in order to reverse track the parent stream.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      8b6ffe40
    • M
      Introduce virStreamInData · 84b50792
      Michal Privoznik 提交于
      This is just an internal API, that calls corresponding function
      in stream driver. This function will set @data = 1 if the
      underlying file is in data section, or @data = 0 if it is in a
      hole. At any rate, @length is set to number of bytes remaining in
      the section the file currently is.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      84b50792
    • M
      Introduce virStreamSparseSendAll · a5249510
      Michal Privoznik 提交于
      This is just a wrapper over new function that have been just
      introduced: virStreamSendHole() . It's very similar to
      virStreamSendAll() except it handles sparse streams well.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      a5249510
    • M
      Introduce virStreamSparseRecvAll · 3a1e2e92
      Michal Privoznik 提交于
      This is just a wrapper over new functions that have been just
      introduced: virStreamRecvFlags(), virStreamRecvHole(). It's very
      similar to virStreamRecvAll() except it handles sparse streams
      well.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      3a1e2e92
    • M
      Introduce VIR_STREAM_RECV_STOP_AT_HOLE flag · 87e4a842
      Michal Privoznik 提交于
      Add a new flag to virStreamRecvFlags in order to handle being able to
      stop reading from the stream so that the consumer can generate a "hole"
      in stream target. Generation of a hole replaces the need to receive and
      handle a sequence of zero bytes for sparse stream targets.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      87e4a842
    • M
      Introduce virStreamRecvHole · b6aedd2f
      Michal Privoznik 提交于
      This function is basically a counterpart for virStreamSendHole().
      If one side of a stream called virStreamSendHole() the other
      should call virStreamRecvHole() to get the size of the hole.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      b6aedd2f
    • M
      Introduce virStreamSendHole · 69a573d0
      Michal Privoznik 提交于
      This API is used to tell the other side of the stream to skip
      some bytes in the stream. This can be used to create a sparse
      file on the receiving side of a stream.
      
      It takes @length argument, which says how big the hole is. This
      skipping is done from the current point of stream. Since our
      streams are not rewindable like regular files, we don't need
      @whence argument like seek(2) has.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      69a573d0
    • M
      Implement virStreamRecvFlags to some drivers · 65b9cd67
      Michal Privoznik 提交于
      There are three virStreamDriver's currently supported:
      
       * virFDStream
       * remote driver
       * ESX driver
      
      For now, backend virStreamRecvFlags support for only remote driver and
      ESX driver is sufficient. Future patches will update virFDStream.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      65b9cd67
    • M
      Introduce virStreamRecvFlags · a35e2836
      Michal Privoznik 提交于
      This patch is adding the virStreamRecvFlags as a variant to the
      virStreamRecv function in order to allow for future expansion of
      functionality for processing sparse streams using a @flags
      argument.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      a35e2836
    • M
      util: Introduce virFileInData · b928d140
      Michal Privoznik 提交于
      This function takes a FD and determines whether the current
      position is in data section or in a hole. In addition to that,
      it also determines how much bytes are there remaining till the
      current section ends.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      b928d140
    • M
      virfdstream: Use messages instead of pipe · 07c2399c
      Michal Privoznik 提交于
      One big downside of using the pipe to transfer the data is that
      we can really transfer just bare data. No metadata can be carried
      through unless some formatted messages are introduced. That would
      be quite painful to achieve so let's use a message queue. It's
      fairly easy to exchange info between threads now that iohelper is
      no longer used.
      
      The reason why we cannot use the FD for plain files directly is
      that despite us setting noblock flag on the FD, any
      read()/write() blocks regardless (which is a show stopper since
      those parts of the code are run from the event loop) and poll()
      reports such FD as always readable/writable - even though the
      subsequent operation might block.
      
      The pipe is still not gone though. It is used to signal the event
      loop that an event occurred (e.g. data is available for reading
      in the queue, or vice versa).
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      07c2399c
    • G
      virsh: add --io when attaching disks to guests · ca21d75d
      Gordon Messmer 提交于
      virt-install and virt-manager both default to explicitly setting
      "io='native'" in the disk "driver" tag. virsh, however, does not and also
      does not provide an option to specify that setting at all.  As a result,
      disks use a different IO mechanism (the default, "threads") when attached
      post-setup using virsh.  Adding this option allows users to keep disk
      performance consistent for disks attached at install, and those attached
      afterward.
      ca21d75d
  2. 17 5月, 2017 1 次提交
  3. 16 5月, 2017 7 次提交
  4. 15 5月, 2017 14 次提交
  5. 12 5月, 2017 5 次提交