1. 02 7月, 2015 2 次提交
    • P
      block/iscsi: restore compatiblity with libiscsi 1.9.0 · 9049736e
      Peter Lieven 提交于
      RHEL7 and others are stuck with libiscsi 1.9.0 since there
      unfortunately was an ABI breakage after that release.
      Signed-off-by: NPeter Lieven <pl@kamp.de>
      Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com>
      Message-id: 1435313881-19366-1-git-send-email-pl@kamp.de
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      9049736e
    • P
      block/iscsi: add support for request timeouts · 5dd7a535
      Peter Lieven 提交于
      libiscsi starting with 1.15 will properly support timeout of iscsi
      commands. The default will remain no timeout, but this can
      be changed via cmdline parameters, e.g.:
      
      qemu -iscsi timeout=30 -drive file=iscsi://...
      
      If a timeout occurs a reconnect is scheduled and the timed out command
      will be requeued for processing after a successful reconnect.
      
      The required API call iscsi_set_timeout is present since libiscsi
      1.10 which was released in October 2013. However, due to some bugs
      in the libiscsi code the use is not recommended before version 1.15.
      
      Please note that this patch bumps the libiscsi requirement to 1.10
      to have all function and macros defined. The patch fixes also a
      off-by-one error in the NOP timeout calculation which was fixed
      while touching these code parts.
      Signed-off-by: NPeter Lieven <pl@kamp.de>
      Message-id: 1434455107-19328-1-git-send-email-pl@kamp.de
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      5dd7a535
  2. 23 6月, 2015 3 次提交
  3. 03 6月, 2015 1 次提交
  4. 28 4月, 2015 9 次提交
  5. 09 4月, 2015 1 次提交
    • P
      block/iscsi: handle zero events from iscsi_which_events · 05b685fb
      Peter Lieven 提交于
      newer libiscsi versions may return zero events from iscsi_which_events.
      
      In this case iscsi_service will return immediately without any progress.
      To avoid busy waiting for iscsi_which_events to change we deregister all
      read and write handlers in this case and schedule a timer to periodically
      check iscsi_which_events for changed events.
      
      Next libiscsi version will introduce async reconnects and zero events
      are returned while libiscsi is waiting for a reconnect retry.
      Signed-off-by: NPeter Lieven <pl@kamp.de>
      Message-id: 1428437295-29577-1-git-send-email-pl@kamp.de
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      05b685fb
  6. 10 3月, 2015 1 次提交
  7. 28 2月, 2015 1 次提交
  8. 03 1月, 2015 1 次提交
  9. 03 11月, 2014 3 次提交
  10. 31 10月, 2014 1 次提交
  11. 20 10月, 2014 3 次提交
  12. 30 9月, 2014 1 次提交
  13. 26 9月, 2014 1 次提交
  14. 22 9月, 2014 2 次提交
  15. 12 9月, 2014 1 次提交
  16. 26 8月, 2014 1 次提交
  17. 22 8月, 2014 1 次提交
  18. 20 8月, 2014 1 次提交
    • M
      block: Use g_new() & friends where that makes obvious sense · 5839e53b
      Markus Armbruster 提交于
      g_new(T, n) is neater than g_malloc(sizeof(T) * n).  It's also safer,
      for two reasons.  One, it catches multiplication overflowing size_t.
      Two, it returns T * rather than void *, which lets the compiler catch
      more type errors.
      
      Patch created with Coccinelle, with two manual changes on top:
      
      * Add const to bdrv_iterate_format() to keep the types straight
      
      * Convert the allocation in bdrv_drop_intermediate(), which Coccinelle
        inexplicably misses
      
      Coccinelle semantic patch:
      
          @@
          type T;
          @@
          -g_malloc(sizeof(T))
          +g_new(T, 1)
          @@
          type T;
          @@
          -g_try_malloc(sizeof(T))
          +g_try_new(T, 1)
          @@
          type T;
          @@
          -g_malloc0(sizeof(T))
          +g_new0(T, 1)
          @@
          type T;
          @@
          -g_try_malloc0(sizeof(T))
          +g_try_new0(T, 1)
          @@
          type T;
          expression n;
          @@
          -g_malloc(sizeof(T) * (n))
          +g_new(T, n)
          @@
          type T;
          expression n;
          @@
          -g_try_malloc(sizeof(T) * (n))
          +g_try_new(T, n)
          @@
          type T;
          expression n;
          @@
          -g_malloc0(sizeof(T) * (n))
          +g_new0(T, n)
          @@
          type T;
          expression n;
          @@
          -g_try_malloc0(sizeof(T) * (n))
          +g_try_new0(T, n)
          @@
          type T;
          expression p, n;
          @@
          -g_realloc(p, sizeof(T) * (n))
          +g_renew(T, p, n)
          @@
          type T;
          expression p, n;
          @@
          -g_try_realloc(p, sizeof(T) * (n))
          +g_try_renew(T, p, n)
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NMax Reitz <mreitz@redhat.com>
      Reviewed-by: NJeff Cody <jcody@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      5839e53b
  19. 15 8月, 2014 1 次提交
  20. 18 7月, 2014 1 次提交
  21. 25 6月, 2014 1 次提交
  22. 19 6月, 2014 3 次提交