1. 04 5月, 2010 33 次提交
  2. 03 5月, 2010 7 次提交
    • A
      Merge remote branch 'kwolf/for-anthony' into HEAD · 72375c22
      Anthony Liguori 提交于
      72375c22
    • A
      a6dac6a9
    • J
      block: Release allocated options after bdrv_open · d748768c
      Jan Kiszka 提交于
      They aren't used afterwards nor supposed to be stored by a bdrv_create
      handler.
      Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      d748768c
    • K
      qemu-img rebase: Fix output image corruption · cc60e327
      Kevin Wolf 提交于
      qemu-img rebase must always give clusters in the COW file priority over those
      in the backing file. As it failed to use number of non-allocated clusters but
      assumed the maximum, it was possible that allocated clusters were taken from
      the backing file instead, leading to a corrupted output image.
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      cc60e327
    • K
      block: Add wr_highest_sector blockstat · 294cc35f
      Kevin Wolf 提交于
      This adds the wr_highest_sector blockstat which implements what is generally
      known as the high watermark. It is the highest offset of a sector written to
      the respective BlockDriverState since it has been opened.
      
      The query-blockstat QMP command is extended to add this value to the result,
      and also to add the statistics of the underlying protocol in a new "parent"
      field. Note that to get the "high watermark" of a qcow2 image, you need to look
      into the wr_highest_sector field of the parent (which can be a file, a
      host_device, ...). The wr_highest_sector of the qcow2 BlockDriverState itself
      is the highest offset on the _virtual_ disk that the guest has written to.
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      294cc35f
    • S
      qcow2: Implement bdrv_truncate() for growing images · 419b19d9
      Stefan Hajnoczi 提交于
      This patch adds the ability to grow qcow2 images in-place using
      bdrv_truncate().  This enables qemu-img resize command support for
      qcow2.
      
      Snapshots are not supported and bdrv_truncate() will return -ENOTSUP.
      The notion of resizing an image with snapshots could lead to confusion:
      users may expect snapshots to remain unchanged, but this is not possible
      with the current qcow2 on-disk format where the header.size field is
      global instead of per-snapshot.  Others may expect snapshots to change
      size along with the current image data.  I think it is safest to not
      support snapshots and perhaps add behavior later if there is a
      consensus.
      
      Backing images continue to work.  If the image is now larger than its
      backing image, zeroes are read when accessing beyond the end of the
      backing image.
      Signed-off-by: NStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      419b19d9
    • K
      qcow2: Remove abort on free_clusters failure · 003fad6e
      Kevin Wolf 提交于
      While it's true that during regular operation free_clusters failure would be a
      bug, an I/O error can always happen. There's no need to kill the VM, the worst
      thing that can happen (and it will) is that we leak some clusters.
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      003fad6e