1. 02 6月, 2015 2 次提交
  2. 08 5月, 2015 1 次提交
  3. 06 5月, 2015 2 次提交
    • E
      qapi: Drop inline nested structs in query-pci · 9fa02cd1
      Eric Blake 提交于
      A future patch will be using a 'name':{dictionary} entry in the
      QAPI schema to specify a default value for an optional argument
      (see previous commit message for more details why); but existing
      use of inline nested structs conflicts with that goal. This patch
      fixes one of only two commands relying on nested types, by
      breaking the nesting into an explicit type; it means that the
      type is now boxed instead of unboxed in C code, but the QMP wire
      format is unaffected by this change.
      
      Prefer the safer g_new0() while making the conversion, and reduce
      some long lines.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Reviewed-by: NMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      9fa02cd1
    • E
      qapi: Drop inline nested struct in query-version · 4752cdbb
      Eric Blake 提交于
      A future patch will be using a 'name':{dictionary} entry in the
      QAPI schema to specify a default value for an optional argument
      (see previous commit message for more details why); but existing
      use of inline nested structs conflicts with that goal. This patch
      fixes one of only two commands relying on nested types, by
      breaking the nesting into an explicit type; it means that the
      type is now boxed instead of unboxed in C code, but the QMP wire
      format is unaffected by this change.
      
      Prefer the safer g_new0() while making the conversion.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Reviewed-by: NMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      4752cdbb
  4. 28 4月, 2015 2 次提交
  5. 17 4月, 2015 1 次提交
    • A
      hmp: fix crash in 'info block -n -v' · 638b8366
      Alberto Garcia 提交于
      The image field in BlockDeviceInfo should never be null, however
      bdrv_block_device_info() is not filling it in.
      
      This makes the 'info block -n -v' command crash QEMU.
      
      The proper solution is probably to move the relevant code from
      bdrv_query_info() to bdrv_block_device_info(), but since we're too
      close to the release for that this simpler workaround solves the
      crash.
      Signed-off-by: NAlberto Garcia <berto@igalia.com>
      Message-id: 1429274688-8115-1-git-send-email-berto@igalia.com
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      638b8366
  6. 17 3月, 2015 5 次提交
  7. 16 3月, 2015 1 次提交
  8. 04 3月, 2015 1 次提交
  9. 03 3月, 2015 1 次提交
  10. 23 2月, 2015 1 次提交
  11. 18 2月, 2015 1 次提交
    • M
      hmp: Name HMP command handler functions hmp_COMMAND() · 3e5a50d6
      Markus Armbruster 提交于
      Some are called do_COMMAND() (old ones, usually), some hmp_COMMAND(),
      and sometimes COMMAND pointlessly differs in spelling.
      
      Normalize to hmp_COMMAND(), where COMMAND is exactly the command name
      with '-' replaced by '_'.
      
      Exceptions:
      
      * do_device_add() and client_migrate_info() *not* renamed to
        hmp_device_add(), hmp_client_migrate_info(), because they're also
        QMP handlers.  They still need to be converted to QAPI.
      
      * do_memory_dump(), do_physical_memory_dump(), do_ioport_read(),
        do_ioport_write() renamed do hmp_* instead of hmp_x(), hmp_xp(),
        hmp_i(), hmp_o(), because those names are too cryptic for my taste.
      
      * do_info_help() renamed to hmp_info_help() instead of hmp_info(),
        because it only covers help.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      3e5a50d6
  12. 16 2月, 2015 1 次提交
    • M
      qemu-io: Use BlockBackend · 4c7b7e9b
      Max Reitz 提交于
      qemu-io should behave like a guest, therefore it should use BlockBackend
      to access the block layer.
      
      There are a couple of places where that is infeasible: First, the
      bdrv_debug_* functions could theoretically be mirrored in the
      BlockBackend, but since these are functions internal to the block layer,
      they should not be visible externally (qemu-io as a test tool is exempt
      from this).
      
      Second, bdrv_get_info() and bdrv_get_specific_info() work on a single
      BDS alone, therefore they should stay BDS-specific.
      
      Third, bdrv_is_allocated() mainly works on a single BDS as well. Some
      data may be passed through from the BDS's file (if sectors which are
      apparently allocated in the file are not really allocated there but just
      zero).
      
      [Fixed conflicts around block_acct_start() usage from Fam Zheng's
      "qemu-io: Account IO by aio_read and aio_write" commit.  Use
      BlockBackend and blk_get_stats() instead of BlockDriverState.
      --Stefan]
      Signed-off-by: NMax Reitz <mreitz@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Message-id: 1423162705-32065-14-git-send-email-mreitz@redhat.com
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      4c7b7e9b
  13. 07 2月, 2015 1 次提交
  14. 29 1月, 2015 1 次提交
  15. 10 12月, 2014 5 次提交
  16. 27 9月, 2014 1 次提交
  17. 22 9月, 2014 1 次提交
  18. 03 9月, 2014 2 次提交
  19. 01 7月, 2014 1 次提交
    • J
      block: add backing-file option to block-stream · 13d8cc51
      Jeff Cody 提交于
      On some image chains, QEMU may not always be able to resolve the
      filenames properly, when updating the backing file of an image
      after a block job.
      
      For instance, certain relative pathnames may fail, or drives may
      have been specified originally by file descriptor (e.g. /dev/fd/???),
      or a relative protocol pathname may have been used.
      
      In these instances, QEMU may lack the information to be able to make
      the correct choice, but the user or management layer most likely does
      have that knowledge.
      
      With this extension to the block-stream api, the user is able to change
      the backing file of the active layer as part of the block-stream
      operation.
      
      This allows the change to be 'safe', in the sense that if the attempt
      to write the active image metadata fails, then the block-stream
      operation returns failure, without disrupting the guest.
      
      If a backing file string is not specified in the command, the backing
      file string to use is determined in the same manner as it was
      previously.
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Signed-off-by: NJeff Cody <jcody@redhat.com>
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      13d8cc51
  20. 28 6月, 2014 1 次提交
  21. 27 6月, 2014 1 次提交
  22. 23 6月, 2014 2 次提交
  23. 19 6月, 2014 1 次提交
  24. 19 5月, 2014 1 次提交
    • P
      block: optimize zero writes with bdrv_write_zeroes · 465bee1d
      Peter Lieven 提交于
      this patch tries to optimize zero write requests
      by automatically using bdrv_write_zeroes if it is
      supported by the format.
      
      This significantly speeds up file system initialization and
      should speed zero write test used to test backend storage
      performance.
      
      I ran the following 2 tests on my internal SSD with a
      50G QCOW2 container and on an attached iSCSI storage.
      
      a) mkfs.ext4 -E lazy_itable_init=0,lazy_journal_init=0 /dev/vdX
      
      QCOW2         [off]     [on]     [unmap]
      -----
      runtime:       14secs    1.1secs  1.1secs
      filesize:      937M      18M      18M
      
      iSCSI         [off]     [on]     [unmap]
      ----
      runtime:       9.3s      0.9s     0.9s
      
      b) dd if=/dev/zero of=/dev/vdX bs=1M oflag=direct
      
      QCOW2         [off]     [on]     [unmap]
      -----
      runtime:       246secs   18secs   18secs
      filesize:      51G       192K     192K
      throughput:    203M/s    2.3G/s   2.3G/s
      
      iSCSI*        [off]     [on]     [unmap]
      ----
      runtime:       8mins     45secs   33secs
      throughput:    106M/s    1.2G/s   1.6G/s
      allocated:     100%      100%     0%
      
      * The storage was connected via an 1Gbit interface.
        It seems to internally handle writing zeroes
        via WRITESAME16 very fast.
      Signed-off-by: NPeter Lieven <pl@kamp.de>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      465bee1d
  25. 16 5月, 2014 1 次提交
  26. 09 5月, 2014 2 次提交