1. 29 5月, 2017 4 次提交
  2. 11 5月, 2017 2 次提交
  3. 09 5月, 2017 1 次提交
  4. 29 4月, 2017 1 次提交
  5. 28 4月, 2017 2 次提交
  6. 27 4月, 2017 3 次提交
    • M
      qemu-img/convert: Move bs_n > 1 && -B check down · 48758a84
      Max Reitz 提交于
      It does not make much sense to use a backing image for the target when
      you concatenate multiple images (because then there is no correspondence
      between the source images' backing files and the target's); but it was
      still possible to give one by using -o backing_file=X instead of -B X.
      
      Fix this by moving the check.
      
      (Also, change the error message because -B is not the only way to
       specify the backing file, evidently.)
      Signed-off-by: NMax Reitz <mreitz@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      48758a84
    • M
      qemu-img/convert: Use @opts for one thing only · 3258b911
      Max Reitz 提交于
      After storing the creation options for the new image into @opts, we
      fetch some things for our own information, like the backing file name,
      or whether to use encryption or preallocation.
      
      With the -n parameter, there will not be any creation options; this is
      not too bad because this just means that querying a NULL @opts will
      always return the default value.
      
      However, we also use @opts for the --object options. Therefore, @opts is
      not necessarily NULL if -n was specified; instead, it may contain those
      options. In practice, this probably does not cause any problems because
      there most likely is no object that supports any of the parameters we
      query here, but this is neither something we should rely on nor does
      this variable reuse make the code very nice to read.
      
      Therefore, just use a separate variable for the --object options.
      Signed-off-by: NMax Reitz <mreitz@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      3258b911
    • P
      qemu-img: simplify img_convert · 9fd77f99
      Peter Lieven 提交于
      img_convert has been around before there was an ImgConvertState or
      a block backend, but it has never been modified to directly use
      these structs. Change this by parsing parameters directly into
      the ImgConvertState and directly use BlockBackend where possible.
      Furthermore variable initialization has been reworked and sorted.
      Signed-off-by: NPeter Lieven <pl@kamp.de>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      9fd77f99
  7. 24 4月, 2017 2 次提交
  8. 27 3月, 2017 3 次提交
  9. 01 3月, 2017 4 次提交
    • K
      commit: Add filter-node-name to block-commit · 0db832f4
      Kevin Wolf 提交于
      Management tools need to be able to know about every node in the graph
      and need a way to address them. Changing the graph structure was okay
      because libvirt doesn't really manage the node level yet, but future
      libvirt versions need to deal with both new and old version of qemu.
      
      This new option to blockdev-commit allows the client to set a node-name
      for the automatically inserted filter driver, and at the same time
      serves as a witness for a future libvirt that this version of qemu does
      automatically insert a filter driver.
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      Acked-by: NFam Zheng <famz@redhat.com>
      Reviewed-by: NMax Reitz <mreitz@redhat.com>
      0db832f4
    • K
      mirror: Use real permissions in mirror/active commit block job · 4ef85a9c
      Kevin Wolf 提交于
      The mirror block job is mainly used for two different scenarios:
      Mirroring to an otherwise unused, independent target node, or for active
      commit where the target node is part of the backing chain of the source.
      
      Similarly to the commit block job patch, we need to insert a new filter
      node to keep the permissions correct during active commit.
      
      Note that one change this implies is that job->blk points to
      mirror_top_bs as its root now, and mirror_top_bs (rather than the actual
      source node) contains the bs->job pointer. This requires qemu-img commit
      to get the job by name now rather than just taking bs->job.
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      Acked-by: NFam Zheng <famz@redhat.com>
      Acked-by: NMax Reitz <mreitz@redhat.com>
      4ef85a9c
    • K
      block: Add BDRV_O_RESIZE for blk_new_open() · 55880601
      Kevin Wolf 提交于
      blk_new_open() is a convenience function that processes flags rather
      than QDict options as a simple way to just open an image file.
      
      In order to keep it convenient in the future, it must automatically
      request the necessary permissions. This can easily be inferred from the
      flags for read and write, but we need another flag that tells us whether
      to get the resize permission.
      
      We can't just always request it because that means that no block jobs
      can run on the resulting BlockBackend (which is something that e.g.
      qemu-img commit wants to do), but we also can't request it never because
      most of the .bdrv_create() implementations call blk_truncate().
      
      The solution is to introduce another flag that is passed by all users
      that want to resize the image.
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      Acked-by: NFam Zheng <famz@redhat.com>
      Reviewed-by: NMax Reitz <mreitz@redhat.com>
      55880601
    • P
      qemu-img: make convert async · 2d9187bc
      Peter Lieven 提交于
      the convert process is currently completely implemented with sync operations.
      That means it reads one buffer and then writes it. No parallelism and each sync
      request takes as long as it takes until it is completed.
      
      This can be a big performance hit when the convert process reads and writes
      to devices which do not benefit from kernel readahead or pagecache.
      In our environment we heavily have the following two use cases when using
      qemu-img convert.
      
      a) reading from NFS and writing to iSCSI for deploying templates
      b) reading from iSCSI and writing to NFS for backups
      
      In both processes we use libiscsi and libnfs so we have no kernel cache.
      
      This patch changes the convert process to work with parallel running coroutines
      which can significantly improve performance for network storage devices:
      
      qemu-img (master)
       nfs -> iscsi 22.8 secs
       nfs -> ram   11.7 secs
       ram -> iscsi 12.3 secs
      
      qemu-img-async (8 coroutines, in-order write disabled)
       nfs -> iscsi 11.0 secs
       nfs -> ram   10.4 secs
       ram -> iscsi  9.0 secs
      
      This patches introduces 2 new cmdline parameters. The -m parameter to specify
      the number of coroutines running in parallel (defaults to 8). And the -W parameter to
      allow qemu-img to write to the target out of order rather than sequential. This improves
      performance as the writes do not have to wait for each other to complete.
      Signed-off-by: NPeter Lieven <pl@kamp.de>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      2d9187bc
  10. 24 2月, 2017 5 次提交
  11. 12 2月, 2017 3 次提交
  12. 25 1月, 2017 1 次提交
  13. 09 1月, 2017 1 次提交
  14. 01 11月, 2016 1 次提交
  15. 28 10月, 2016 1 次提交
  16. 25 10月, 2016 2 次提交
  17. 24 10月, 2016 2 次提交
  18. 12 10月, 2016 1 次提交
    • D
      trace: provide mechanism for registering trace events · fe4db84d
      Daniel P. Berrange 提交于
      Remove the notion of there being a single global array
      of trace events, by introducing a method for registering
      groups of events.
      
      The module_call_init() needs to be invoked at the start
      of any program that wants to make use of the trace
      support. Currently this covers system emulators qemu-nbd,
      qemu-img and qemu-io.
      
      [Squashed the following fix from Daniel P. Berrange
      <berrange@redhat.com>:
      
      linux-user/bsd-user: initialize trace events subsystem
      
      The bsd-user/linux-user programs make use of the CPU emulation
      code and this now requires that the trace events subsystem
      is enabled, otherwise it'll crash trying to allocate an empty
      trace events bitmap for the CPU object.
      
      --Stefan]
      Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com>
      Reviewed-by: NLluís Vilanova <vilanova@ac.upc.edu>
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      Message-id: 1475588159-30598-14-git-send-email-berrange@redhat.com
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      fe4db84d
  19. 21 9月, 2016 1 次提交