1. 29 May, 2017 5 commits
  2. 23 May, 2017 1 commit
  3. 11 May, 2017 2 commits
  4. 09 May, 2017 1 commit
  5. 28 Apr, 2017 3 commits
  6. 27 Apr, 2017 3 commits
    • Max Reitz's avatar
      qemu-img/convert: Move bs_n > 1 && -B check down · 48758a84
      Max Reitz authored
      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: 's avatarMax Reitz <mreitz@redhat.com>
      Reviewed-by: 's avatarEric Blake <eblake@redhat.com>
      Signed-off-by: 's avatarKevin Wolf <kwolf@redhat.com>
    • Max Reitz's avatar
      qemu-img/convert: Use @opts for one thing only · 3258b911
      Max Reitz authored
      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: 's avatarMax Reitz <mreitz@redhat.com>
      Reviewed-by: 's avatarEric Blake <eblake@redhat.com>
      Signed-off-by: 's avatarKevin Wolf <kwolf@redhat.com>
    • Peter Lieven's avatar
      qemu-img: simplify img_convert · 9fd77f99
      Peter Lieven authored
      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: 's avatarPeter Lieven <pl@kamp.de>
      Reviewed-by: 's avatarEric Blake <eblake@redhat.com>
      Signed-off-by: 's avatarKevin Wolf <kwolf@redhat.com>
  7. 24 Apr, 2017 2 commits
  8. 27 Mar, 2017 3 commits
  9. 28 Feb, 2017 4 commits
    • Kevin Wolf's avatar
      commit: Add filter-node-name to block-commit · 0db832f4
      Kevin Wolf authored
      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: 's avatarKevin Wolf <kwolf@redhat.com>
      Acked-by: 's avatarFam Zheng <famz@redhat.com>
      Reviewed-by: 's avatarMax Reitz <mreitz@redhat.com>
    • Kevin Wolf's avatar
      mirror: Use real permissions in mirror/active commit block job · 4ef85a9c
      Kevin Wolf authored
      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: 's avatarKevin Wolf <kwolf@redhat.com>
      Acked-by: 's avatarFam Zheng <famz@redhat.com>
      Acked-by: 's avatarMax Reitz <mreitz@redhat.com>
    • Kevin Wolf's avatar
      block: Add BDRV_O_RESIZE for blk_new_open() · 55880601
      Kevin Wolf authored
      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: 's avatarKevin Wolf <kwolf@redhat.com>
      Acked-by: 's avatarFam Zheng <famz@redhat.com>
      Reviewed-by: 's avatarMax Reitz <mreitz@redhat.com>
    • Peter Lieven's avatar
      qemu-img: make convert async · 2d9187bc
      Peter Lieven authored
      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: 's avatarPeter Lieven <pl@kamp.de>
      Signed-off-by: 's avatarKevin Wolf <kwolf@redhat.com>
  10. 23 Feb, 2017 5 commits
  11. 11 Feb, 2017 3 commits
  12. 24 Jan, 2017 1 commit
  13. 09 Jan, 2017 1 commit
  14. 01 Nov, 2016 1 commit
  15. 28 Oct, 2016 1 commit
  16. 25 Oct, 2016 2 commits
  17. 24 Oct, 2016 2 commits