1. 28 2月, 2015 1 次提交
  2. 03 1月, 2015 1 次提交
  3. 03 11月, 2014 3 次提交
  4. 31 10月, 2014 1 次提交
  5. 20 10月, 2014 3 次提交
  6. 30 9月, 2014 1 次提交
  7. 26 9月, 2014 1 次提交
  8. 22 9月, 2014 2 次提交
  9. 12 9月, 2014 1 次提交
  10. 26 8月, 2014 1 次提交
  11. 22 8月, 2014 1 次提交
  12. 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
  13. 15 8月, 2014 1 次提交
  14. 18 7月, 2014 1 次提交
  15. 25 6月, 2014 1 次提交
  16. 19 6月, 2014 3 次提交
  17. 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
  18. 16 6月, 2014 3 次提交
  19. 04 6月, 2014 1 次提交
  20. 20 5月, 2014 1 次提交
  21. 09 5月, 2014 1 次提交
  22. 05 5月, 2014 1 次提交
  23. 29 4月, 2014 3 次提交
    • P
      block/iscsi: allow cluster_size of 4K and greater · 3d2acaa3
      Peter Lieven 提交于
      depending on the target the opt_unmap_gran might be as low
      as 4K. As we know use this also as a knob to activate the allocationmap
      feature lower the barrier. The limit 4K (and not 512) is choosen
      to avoid a potentially too big allocationmap.
      Signed-off-by: NPeter Lieven <pl@kamp.de>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      3d2acaa3
    • P
      5917af81
    • P
      block/iscsi: speed up read for unallocated sectors · b03c3805
      Peter Lieven 提交于
      this patch implements a cache that tracks if a page on the
      iscsi target is allocated or not. The cache is implemented in
      a way that it allows for false positives
      (e.g. pretending a page is allocated, but it isn't), but
      no false negatives.
      
      The cached allocation info is then used to speed up the
      read process for unallocated sectors by issueing a GET_LBA_STATUS
      request for all sectors that are not yet known to be allocated.
      If the read request is confirmed to fall into an unallocated
      range we directly return zeroes and do not transfer the
      data over the wire.
      
      Tests have shown that a relatively small amount of GET_LBA_STATUS
      requests happens a vServer boot time to fill the allocation cache
      (all those blocks are not queried again).
      
      Not to transfer all the data of unallocated sectors saves a lot
      of time, bandwidth and storage I/O load during block jobs or storage
      migration and it saves a lot of bandwidth as well for any big sequential
      read of the whole disk (e.g. block copy or speed tests) if a significant
      number of blocks is unallocated.
      Signed-off-by: NPeter Lieven <pl@kamp.de>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      b03c3805
  24. 28 4月, 2014 1 次提交
  25. 26 4月, 2014 1 次提交
  26. 22 4月, 2014 1 次提交
    • K
      block: Add errp to bdrv_new() · 98522f63
      Kevin Wolf 提交于
      This patch adds an errp parameter to bdrv_new() and updates all its
      callers. The next patches will make use of this in order to check for
      duplicate IDs. Most of the callers know that their ID is fine, so they
      can simply assert that there is no error.
      
      Behaviour doesn't change with this patch yet as bdrv_new() doesn't
      actually assign errors to errp.
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      98522f63
  27. 11 4月, 2014 1 次提交