1. 28 4月, 2015 9 次提交
  2. 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
  3. 10 3月, 2015 1 次提交
  4. 28 2月, 2015 1 次提交
  5. 03 1月, 2015 1 次提交
  6. 03 11月, 2014 3 次提交
  7. 31 10月, 2014 1 次提交
  8. 20 10月, 2014 3 次提交
  9. 30 9月, 2014 1 次提交
  10. 26 9月, 2014 1 次提交
  11. 22 9月, 2014 2 次提交
  12. 12 9月, 2014 1 次提交
  13. 26 8月, 2014 1 次提交
  14. 22 8月, 2014 1 次提交
  15. 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
  16. 15 8月, 2014 1 次提交
  17. 18 7月, 2014 1 次提交
  18. 25 6月, 2014 1 次提交
  19. 19 6月, 2014 3 次提交
  20. 18 6月, 2014 3 次提交
    • P
      block/iscsi: use 16 byte CDBs only when necessary · 9281fe9e
      Peter Lieven 提交于
      this patch changes the driver to uses 16 Byte CDBs for
      READ/WRITE only if the target requires 64bit lba addressing.
      
      On one hand this saves 6 bytes in each PDU on the other
      hand it seems that 10 Byte CDBs seems to be much better
      supported and tested as a recent issue I had with a
      major storage supplier lined out.
      
      For WRITESAME the logic is a bit more tricky as WRITESAME10
      with UNMAP was added really late. Thus a fallback to WRITESAME16
      is possible if it supports UNMAP and WRITESAME10 not.
      Signed-off-by: NPeter Lieven <pl@kamp.de>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      9281fe9e
    • P
      block/iscsi: fix potential segfault on early callback · fcd470d8
      Peter Lieven 提交于
      it might happen in the future that a function directly invokes its callback.
      In this case we end up in a segfault because the iTask is gone when the BH
      is scheduled.
      Signed-off-by: NPeter Lieven <pl@kamp.de>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      fcd470d8
    • P
      block/iscsi: handle BUSY condition · efc6de0d
      Peter Lieven 提交于
      this patch adds handling of BUSY status reponse from an iSCSI target.
      Currently, we fail with -EIO in case of SCSI_STATUS_BUSY while the
      obvious reaction would be to retry the operation after some time.
      The retry time is randomly choosen from a range with exponential
      growth increasing with each retry.
      
      This patch includes most of the changes by a an upcoming patch
      from Stefan Hajnoczi:
      
       iscsi: implement .bdrv_detach/attach_aio_context()
      
      because I also need the reference to the aio_context for
      the retry timer to work. I included the changes to maintain
      better mergeability.
      Signed-off-by: NPeter Lieven <pl@kamp.de>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      efc6de0d
  21. 16 6月, 2014 3 次提交