1. 14 7月, 2017 1 次提交
  2. 10 7月, 2017 1 次提交
  3. 15 6月, 2017 2 次提交
  4. 07 6月, 2017 2 次提交
  5. 21 2月, 2017 1 次提交
  6. 23 1月, 2017 1 次提交
  7. 20 7月, 2016 1 次提交
  8. 08 4月, 2016 1 次提交
    • P
      nbd: do not hang nbd_wr_syncv if outside a coroutine and no available data · dacca04c
      Paolo Bonzini 提交于
      Until commit 1c778ef7 ("nbd: convert to using I/O channels for actual
      socket I/O", 2016-02-16), nbd_wr_sync returned -EAGAIN this scenario.
      nbd_reply_ready required these semantics because it has two conflicting
      requirements:
      
      1) if a reply can be received on the socket, nbd_reply_ready needs
      to read the header outside coroutine context to identify _which_
      coroutine to enter to process the rest of the reply
      
      2) on the other hand, nbd_reply_ready can find a false positive if
      another thread (e.g. a VCPU thread running aio_poll) sneaks in and
      calls nbd_reply_ready too.  In this case nbd_reply_ready does nothing
      and expects nbd_wr_syncv to return -EAGAIN.
      
      Currently, the solution to the first requirement is to wait in the very
      rare case of a read() that doesn't retrieve the reply header in its
      entirety; this is what nbd_wr_syncv does by calling qio_channel_wait().
      However, the unconditional call to qio_channel_wait() breaks the second
      requirement.  To fix this, the patch makes nbd_wr_syncv return -EAGAIN
      if done is zero, similar to the code before commit 1c778ef7.
      
      This is okay because NBD client-side negotiation is the only other case
      that calls nbd_wr_syncv outside a coroutine, and it places the socket
      in blocking mode.  On the other hand, it is a bit unpleasant to put
      this in nbd_wr_syncv(), because the function is used by both client
      and server.
      
      The full fix would be to add a counter to NbdClientSession for how
      many bytes have been filled in s->reply.  Then a reply can be filled
      by multiple separate invocations of nbd_reply_ready and the
      qio_channel_wait() call can be removed completely.  Something to
      consider for 2.7...
      Reported-by: NChanglong Xie <xiecl.fnst@cn.fujitsu.com>
      Reviewed-by: NDaniel P. Berrange <berrange@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      dacca04c
  9. 23 3月, 2016 1 次提交
    • M
      include/qemu/osdep.h: Don't include qapi/error.h · da34e65c
      Markus Armbruster 提交于
      Commit 57cb38b3 included qapi/error.h into qemu/osdep.h to get the
      Error typedef.  Since then, we've moved to include qemu/osdep.h
      everywhere.  Its file comment explains: "To avoid getting into
      possible circular include dependencies, this file should not include
      any other QEMU headers, with the exceptions of config-host.h,
      compiler.h, os-posix.h and os-win32.h, all of which are doing a
      similar job to this file and are under similar constraints."
      qapi/error.h doesn't do a similar job, and it doesn't adhere to
      similar constraints: it includes qapi-types.h.  That's in excess of
      100KiB of crap most .c files don't actually need.
      
      Add the typedef to qemu/typedefs.h, and include that instead of
      qapi/error.h.  Include qapi/error.h in .c files that need it and don't
      get it now.  Include qapi-types.h in qom/object.h for uint16List.
      
      Update scripts/clean-includes accordingly.  Update it further to match
      reality: replace config.h by config-target.h, add sysemu/os-posix.h,
      sysemu/os-win32.h.  Update the list of includes in the qemu/osdep.h
      comment quoted above similarly.
      
      This reduces the number of objects depending on qapi/error.h from "all
      of them" to less than a third.  Unfortunately, the number depending on
      qapi-types.h shrinks only a little.  More work is needed for that one.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      [Fix compilation without the spice devel packages. - Paolo]
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      da34e65c
  10. 17 2月, 2016 2 次提交
  11. 05 2月, 2016 1 次提交
    • P
      all: Clean up includes · d38ea87a
      Peter Maydell 提交于
      Clean up includes so that osdep.h is included first and headers
      which it implies are not included manually.
      
      This commit was created with scripts/clean-includes.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Message-id: 1454089805-5470-16-git-send-email-peter.maydell@linaro.org
      d38ea87a
  12. 16 1月, 2016 1 次提交
    • F
      nbd: Split nbd.c · 798bfe00
      Fam Zheng 提交于
      We have NBD server code and client code, all mixed in a file. Now split
      them into separate files under nbd/, and update MAINTAINERS.
      
      filter_nbd for iotest 083 is updated to keep the log filtered out.
      Signed-off-by: NFam Zheng <famz@redhat.com>
      Message-Id: <1452760863-25350-3-git-send-email-famz@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      798bfe00