Skip to content
Snippets Groups Projects
  1. Sep 26, 2014
  2. Sep 22, 2014
  3. Sep 02, 2014
  4. Jul 01, 2014
    • Jeff Cody's avatar
      block: add backing-file option to block-stream · 13d8cc51
      Jeff Cody authored
      
      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: default avatarEric Blake <eblake@redhat.com>
      Signed-off-by: default avatarJeff Cody <jcody@redhat.com>
      Signed-off-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
      13d8cc51
  5. Jun 27, 2014
  6. Jun 23, 2014
  7. Jun 19, 2014
  8. May 19, 2014
    • Peter Lieven's avatar
      block: optimize zero writes with bdrv_write_zeroes · 465bee1d
      Peter Lieven authored
      
      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: default avatarPeter Lieven <pl@kamp.de>
      Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
      465bee1d
  9. May 15, 2014
  10. May 09, 2014
  11. May 08, 2014
  12. May 05, 2014
  13. Apr 25, 2014
  14. Feb 28, 2014
    • Qiao Nuohan's avatar
      dump: make kdump-compressed format available for 'dump-guest-memory' · b53ccc30
      Qiao Nuohan authored
      
      Make monitor command 'dump-guest-memory' be able to dump in kdump-compressed
      format. The command's usage:
      
        dump [-p] protocol [begin] [length] [format]
      
      'format' is used to specified the format of vmcore and can be:
      1. 'elf': ELF format, without compression
      2. 'kdump-zlib': kdump-compressed format, with zlib-compressed
      3. 'kdump-lzo': kdump-compressed format, with lzo-compressed
      4. 'kdump-snappy': kdump-compressed format, with snappy-compressed
      Without 'format' being set, it is same as 'elf'. And if non-elf format is
      specified, paging and filter is not allowed.
      
      Note:
        1. The kdump-compressed format is readable only with the crash utility and
           makedumpfile, and it can be smaller than the ELF format because of the
           compression support.
        2. The kdump-compressed format is the 6th edition.
      
      Signed-off-by: default avatarQiao Nuohan <qiaonuohan@cn.fujitsu.com>
      Reviewed-by: default avatarLaszlo Ersek <lersek@redhat.com>
      Signed-off-by: default avatarLuiz Capitulino <lcapitulino@redhat.com>
      b53ccc30
  15. Feb 17, 2014
  16. Jan 24, 2014
  17. Jan 22, 2014
    • Stefan Hajnoczi's avatar
      readline: decouple readline from the monitor · c60bf339
      Stefan Hajnoczi authored
      
      Make the readline.c functionality reusable.  Instead of calling
      monitor_printf() and monitor_flush() directly, invoke function pointers
      provided by the user.
      
      This way readline.c does not know about Monitor and other users will be
      able to make use of readline.c.
      
      Note that there is already an "opaque" argument to the ReadLineFunc
      callback.  Consistently call it "readline_opaque" from now on to
      distinguish from the ReadLinePrintfFunc/ReadLineFlushFunc "opaque"
      argument.
      
      I also dropped the printf macro trickery since it's now highly unlikely
      that anyone modifying readline.c would call printf(3) directly.  We no
      longer need this protection.
      
      Signed-off-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
      Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
      c60bf339
  18. Jan 06, 2014
  19. Oct 17, 2013
    • Mike Qiu's avatar
      hmp: drop bogus "[not inserted]" · 684b2544
      Mike Qiu authored
      
      Commit 3e9fab69 ("block: Add support for
      throttling burst max in QMP and the command line.") introduced bogus
      "[not inserted]" output, possibly due to a merge failure.  Remove this
      artifact.
      
      Output of 'info block'
      
      scsi0-hd0: /images/f18-ppc64.qcow2 (qcow2)
       [not inserted]
      scsi0-cd2: [not inserted]
          Removable device: not locked, tray closed
      
      floppy0: [not inserted]
          Removable device: not locked, tray closed
      
      sd0: [not inserted]
          Removable device: not locked, tray closed
      
      There will be no additional lines between scsi0-hd0 and
      scsi0-cd2.
      
      At the same time, scsi0-hd0 already inserted, but still has
      '[not inserted]' flag. This line should be removed.
      
      This patch is to solve this.
      
      Signed-off-by: default avatarMike Qiu <qiudayu@linux.vnet.ibm.com>
      Signed-off-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
      684b2544
  20. Sep 17, 2013
  21. Sep 12, 2013
  22. Sep 09, 2013
  23. Sep 06, 2013
  24. Aug 22, 2013
  25. Jul 23, 2013
  26. Jul 15, 2013
    • Stefan Hajnoczi's avatar
      block: add drive_backup HMP command · de90930a
      Stefan Hajnoczi authored
      
      Make "drive_backup" available on the HMP monitor:
      
        drive_backup [-n] [-f] device target [format]
      
      The -n flag requests QEMU to reuse the image found in new-image-file,
      instead of recreating it from scratch.
      
      The -f flag requests QEMU to copy the whole disk, so that the result
      does not need a backing file.  Note that this flag *must* currently be
      passed since the other sync modes ('none' and 'top') have not been
      implemented yet.  Requiring it ensures that "drive_backup" behaves like
      "drive_mirror".
      
      Signed-off-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
      Reviewed-by: default avatarEric Blake <eblake@redhat.com>
      Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
      de90930a
  27. Jun 28, 2013
    • Kevin Wolf's avatar
      hmp: Make "info block" output more readable · fbe2e26c
      Kevin Wolf authored
      
      HMP is meant for humans and you should notice it.
      
      This changes the output format to use a bit more space to display the
      information more readable and leaves out irrelevant information (e.g.
      mention only that an image is encrypted, but not when it's not; display
      I/O limits only if throttling is in effect; ...)
      
      Before:
      
          (qemu) info block
          ide0-hd0: removable=0 io-status=ok file=/tmp/overlay.qcow2
          backing_file=/tmp/backing.img backing_file_depth=1 ro=0 drv=qcow2
          encrypted=1 bps=0 bps_rd=0 bps_wr=0 iops=1024 iops_rd=0 iops_wr=0
          ide1-cd0: removable=1 locked=0 tray-open=0 io-status=ok
          file=/home/kwolf/images/iso/Fedora-18-x86_64-Live-Desktop.iso ro=1
          drv=raw encrypted=0 bps=0 bps_rd=0 bps_wr=0 iops=0 iops_rd=0 iops_wr=0
          floppy0: removable=1 locked=0 tray-open=0 [not inserted]
          sd0: removable=1 locked=0 tray-open=0 [not inserted]
      
      After:
      
          (qemu) info block
          ide0-hd0: /tmp/overlay.qcow2 (qcow2, encrypted)
              Backing file:     /tmp/backing.img (chain depth: 1)
              I/O limits:       bps=0 bps_rd=0 bps_wr=0 iops=1024 iops_rd=0 iops_wr=0
      
          ide1-cd0: /home/kwolf/images/iso/Fedora-18-x86_64-Live-Desktop.iso (raw, read-only)
              Removable device: not locked, tray closed
      
          floppy0: [not inserted]
              Removable device: not locked, tray closed
      
          sd0: [not inserted]
              Removable device: not locked, tray closed
      
      Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
      Reviewed-by: default avatarFam Zheng <famz@redhat.com>
      Acked-by: default avatarAnthony Liguori <aliguori@us.ibm.com>
      Signed-off-by: default avatarLuiz Capitulino <lcapitulino@redhat.com>
      fbe2e26c
  28. Jun 27, 2013
  29. Jun 07, 2013
Loading