1. 07 11月, 2013 1 次提交
  2. 24 10月, 2013 1 次提交
  3. 26 9月, 2013 1 次提交
  4. 12 9月, 2013 2 次提交
  5. 28 6月, 2013 1 次提交
  6. 15 3月, 2013 1 次提交
  7. 12 2月, 2013 1 次提交
  8. 11 2月, 2013 1 次提交
  9. 01 2月, 2013 1 次提交
  10. 19 12月, 2012 3 次提交
  11. 11 12月, 2012 2 次提交
  12. 24 9月, 2012 1 次提交
  13. 15 8月, 2012 2 次提交
  14. 05 4月, 2012 2 次提交
  15. 09 2月, 2012 2 次提交
    • K
      vpc: Round up image size during fixed image creation · ecd880d9
      Kevin Wolf 提交于
      The geometry calculation algorithm from the VHD spec rounds the image
      size down if it doesn't exactly match a geometry. During image
      conversion, this causes the image to be truncated. For dynamic images,
      we already have code in place to round up instead, let's do the same for
      fixed images.
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      ecd880d9
    • C
      vpc: Add support for Fixed Disk type · 24da78db
      Charles Arnold 提交于
      The Virtual Hard Disk Image Format Specification allows for three
      types of hard disk formats, Fixed, Dynamic, and Differencing.  Qemu
      currently only supports Dynamic disks.  This patch adds support for
      the Fixed Disk format.
      
      Usage:
          Example 1: qemu-img create -f vpc -o type=fixed <filename> [size]
          Example 2: qemu-img convert -O vpc -o type=fixed <input filename> <output filename>
      
      While it is also allowed to specify '-o type=dynamic', the default disk type
      remains Dynamic and is what is used when the type is left unspecified.
      Signed-off-by: NCharles Arnold <carnold@suse.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      24da78db
  16. 24 11月, 2011 2 次提交
  17. 11 11月, 2011 2 次提交
  18. 21 10月, 2011 4 次提交
    • P
      block: change flush to co_flush · 8b94ff85
      Paolo Bonzini 提交于
      Since coroutine operation is now mandatory, convert all bdrv_flush
      implementations to coroutines.  For qcow2, this means taking the lock.
      Other implementations are simpler and just forward bdrv_flush to the
      underlying protocol, so they can avoid the lock.
      
      The bdrv_flush callback is then unused and can be eliminated.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      8b94ff85
    • P
      block: take lock around bdrv_write implementations · e183ef75
      Paolo Bonzini 提交于
      This does the first part of the conversion to coroutines, by
      wrapping bdrv_write implementations to take the mutex.
      
      Drivers that implement bdrv_write rather than bdrv_co_writev can
      then benefit from asynchronous operation (at least if the underlying
      protocol supports it, which is not the case for raw-win32), even
      though they still operate with a bounce buffer.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      e183ef75
    • P
      block: take lock around bdrv_read implementations · 2914caa0
      Paolo Bonzini 提交于
      This does the first part of the conversion to coroutines, by
      wrapping bdrv_read implementations to take the mutex.
      
      Drivers that implement bdrv_read rather than bdrv_co_readv can
      then benefit from asynchronous operation (at least if the underlying
      protocol supports it, which is not the case for raw-win32), even
      though they still operate with a bounce buffer.
      
      raw-win32 does not need the lock, because it cannot yield.
      nbd also doesn't probably, but better be safe.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      2914caa0
    • P
      block: add a CoMutex to synchronous read drivers · 848c66e8
      Paolo Bonzini 提交于
      The big conversion of bdrv_read/write to coroutines caused the two
      homonymous callbacks in BlockDriver to become reentrant.  It goes
      like this:
      
      1) bdrv_read is now called in a coroutine, and calls bdrv_read or
      bdrv_pread.
      
      2) the nested bdrv_read goes through the fast path in bdrv_rw_co_entry;
      
      3) in the common case when the protocol is file, bdrv_co_do_readv calls
      bdrv_co_readv_em (and from here goes to bdrv_co_io_em), which yields
      until the AIO operation is complete;
      
      4) if bdrv_read had been called from a bottom half, the main loop
      is free to iterate again: a device model or another bottom half
      can then come and call bdrv_read again.
      
      This applies to all four of read/write/flush/discard.  It would also
      apply to is_allocated, but it is not used from within coroutines:
      besides qemu-img.c and qemu-io.c, which operate synchronously, the
      only user is the monitor.  Copy-on-read will introduce a use in the
      block layer, and will require converting it.
      
      The solution is "simply" to convert all drivers to coroutines!  We
      just need to add a CoMutex that is taken around affected operations.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      848c66e8
  19. 21 8月, 2011 1 次提交
  20. 01 8月, 2011 1 次提交
    • S
      block/vpc.c: Detect too-large vpc file · efc8243d
      Serge E. Hallyn 提交于
      VHD files technically can be up to 2Tb, but virtual pc is limited
      to 127G.  Currently qemu-img refused to create vpc files > 127G,
      but it is failing to return error when converting from a non-vpc
      VHD file which is >127G.  It returns success, but creates a truncated
      converted image.  Also, qemu-img info claims the vpc file is 127G
      (and clean).
      
      This patch detects a too-large vpc file and returns -EFBIG.  Without
      this patch,
      
      =============================================================
      root@ip-10-38-123-242:~/qemu-fixed# qemu-img info /mnt/140g-dynamic.vhd
      image: /mnt/140g-dynamic.vhd
      file format: vpc
      virtual size: 127G (136899993600 bytes)
      disk size: 284K
      root@ip-10-38-123-242:~/qemu-fixed# qemu-img convert -f vpc -O raw /mnt/140g-dynamic.vhd /mnt/y
      root@ip-10-38-123-242:~/qemu-fixed# echo $?
      0
      root@ip-10-38-123-242:~/qemu-fixed# qemu-img info /mnt/y
      image: /mnt/y
      file format: raw
      virtual size: 127G (136899993600 bytes)
      disk size: 0
      =============================================================
      
      (The 140G image was truncated with no warning or error.)
      
      With the patch, I get:
      
      =============================================================
      root@ip-10-38-123-242:~/qemu-fixed# ./qemu-img info /mnt/140g-dynamic.vhd
      qemu-img: Could not open '/mnt/140g-dynamic.vhd': File too large
      root@ip-10-38-123-242:~/qemu-fixed# ./qemu-img convert -f vpc -O raw /mnt/140g-dynamic.vhd /mnt/y
      qemu-img: Could not open '/mnt/140g-dynamic.vhd': File too large
      qemu-img: Could not open '/mnt/140g-dynamic.vhd'
      =============================================================
      
      See https://bugs.launchpad.net/qemu/+bug/814222 for details.
      Signed-off-by: NSerge Hallyn <serge.hallyn@canonical.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      efc8243d
  21. 13 4月, 2011 1 次提交
  22. 13 1月, 2011 1 次提交
  23. 25 11月, 2010 1 次提交
  24. 04 11月, 2010 1 次提交
  25. 22 6月, 2010 1 次提交
  26. 15 6月, 2010 1 次提交
    • K
      vpc: Read/write multiple sectors at once · 6c6ea921
      Kevin Wolf 提交于
      This changes the vpc block driver (for VHD) to read/write multiple sectors at
      once instead of doing a request for each single sector.
      
      Before this, running qemu-iotests for VPC took ages, now it's actually quite
      reasonable to run it always (down from ~1 hour to 40 seconds for me).
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      6c6ea921
  27. 17 5月, 2010 1 次提交
    • S
      block/vpc: Fix conversion from size to disk geometry · dede4188
      Stefan Weil 提交于
      The VHD algorithm calculates a disk geometry
      which is usually smaller than the requested size.
      
      QEMU tried to round up but failed for certain sizes:
      
      qemu-img create -f vpc disk.vpc 9437184
      would create an image with 9435136 bytes
      (which is too small for qemu-img convert).
      
      Instead of hacking the geometry algorithm, the patch
      increases the number of sectors until we get enough
      sectors.
      
      Cc: Kevin Wolf <kwolf@redhat.com>
      Signed-off-by: NStefan Weil <weil@mail.berlios.de>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      dede4188
  28. 03 5月, 2010 1 次提交
    • K
      block: Open the underlying image file in generic code · 66f82cee
      Kevin Wolf 提交于
      Format drivers shouldn't need to bother with things like file names, but rather
      just get an open BlockDriverState for the underlying protocol. This patch
      introduces this behaviour for bdrv_open implementation. For protocols which
      need to access the filename to open their file/device/connection/... a new
      callback bdrv_file_open is introduced which doesn't get an underlying file
      opened.
      
      For now, also some of the more obscure formats use bdrv_file_open because they
      open() the file themselves instead of using the block.c functions. They need to
      be fixed in later patches.
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      66f82cee