1. 20 4月, 2012 13 次提交
    • K
      qcow2: Ignore reserved bits in check_refcounts · afdf0abe
      Kevin Wolf 提交于
      Also don't infer the cluster type directly from the L2 entries, but use
      qcow2_get_cluster_type() to keep everything in a single place.
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      afdf0abe
    • K
      qcow2: Ignore reserved bits in refcount table entries · 76dc9e0c
      Kevin Wolf 提交于
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      76dc9e0c
    • K
      qcow2: Simplify count_cow_clusters · 143550a8
      Kevin Wolf 提交于
      count_cow_clusters() tries to reuse existing functions, and all it
      achieves is to make things much more complicated than they really are:
      Everything needs COW, unless it's a normal cluster with refcount 1.
      
      This patch implements the obvious way of doing this, and by using
      qcow2_get_cluster_type() it gets rid of all flag magic.
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      143550a8
    • K
      qcow2: Refactor qcow2_free_any_clusters · c7a4c37a
      Kevin Wolf 提交于
      Zero clusters will add another cluster type. Refactor the open-coded
      cluster type detection into a switch of QCOW2_CLUSTER_* options so that
      the detection is in a single place. This makes it easier to add new
      cluster types.
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      c7a4c37a
    • K
      qcow2: Ignore reserved bits in L1/L2 entries · 8e37f681
      Kevin Wolf 提交于
      This changes the still existing places that assume that the only flags
      are QCOW_OFLAG_COPIED and QCOW_OFLAG_COMPRESSED to properly mask out
      reserved bits.
      
      It does not convert bdrv_check yet.
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      8e37f681
    • K
      qcow2: Fail write_compressed when overwriting data · b0b6862e
      Kevin Wolf 提交于
      qcow2_alloc_compressed_cluster_offset() already fails if the copied flag
      is set, because qcow2_write_compressed() doesn't perform COW as it would
      have to do to allow this.
      
      However, what we really want to check here is whether the cluster is
      allocated or not. With internal snapshots the copied flag may not be set
      on allocated clusters. Check the cluster offset instead.
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      b0b6862e
    • K
      qcow2: Ignore reserved bits in count_contiguous_clusters() · 2bfcc4a0
      Kevin Wolf 提交于
      Until now, count_contiguous_clusters() has an argument that allowed to
      specify flags that should be ignored in the comparison, i.e. that are
      allowed to change between contiguous clusters.
      
      This patch changes the function so that it ignores all flags by default
      now and you need to pass the flags on which it should stop.
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      2bfcc4a0
    • K
      qcow2: Ignore reserved bits in get_cluster_offset · 68d000a3
      Kevin Wolf 提交于
      With this change, reading from a qcow2 image ignores all reserved bits
      that are set in an L1 or L2 table entry.
      
      Now get_cluster_offset() assigns *cluster_offset only the offset without
      any other flags. The cluster type is not longer encoded in the offset,
      but a positive return value in case of success.
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      68d000a3
    • K
      qcow2: Save disk size in snapshot header · 90b27759
      Kevin Wolf 提交于
      This allows that different snapshots of an image can have different
      sizes, which is a requirement for enabling image resizing even with
      images that have internal snapshots.
      
      We don't do the actual support for it now, but make sure that the
      additional field is present and not completely ignored in all version 3
      images. When trying to load a snapshot of different size, it returns
      an error.
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      90b27759
    • K
      Specification for qcow2 version 3 · 4fabffc1
      Kevin Wolf 提交于
      This updates the qcow2 specification to cover version 3. It contains the
      following changes:
      
      - Added compatible/incompatible/auto-clear feature bits plus an optional
        feature name table to allow useful error messages even if an older
        version doesn't know some feature at all.
      
      - Configurable refcount width. If you don't want to use internal
        snapshots, make refcounts one bit and save cache space and I/O.
      
      - Zero cluster flags. This allows discard even with a backing file that
        doesn't contain zeros. It is also useful for copy-on-read/image
        streaming, as you'll want to keep sparseness without accessing the
        remote image for an unallocated cluster all the time.
      
      - Fixed internal snapshot metadata to use 64 bit VM state size. You
        can't save a snapshot of a VM with >= 4 GB RAM today.
      
      - Extended internal snapshot metadata to contain the disk size, so that
        resizing images that have snapshots can be allowed in the future.
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      4fabffc1
    • K
      qcow2: Fix refcount block allocation during qcow2_alloc_cluster_at() · f24423bd
      Kevin Wolf 提交于
      Refcount block allocation and refcount table growth rely on
      s->free_cluster_index pointing to somewhere after the current
      allocation. Change qcow2_alloc_cluster_at() to fulfill this
      assumption.
      
      Without this change it could happen that a newly allocated refcount
      block and the allocated data block point to the same area in the image
      file, causing data corruption in the long run.
      
      This fixes a bug that became first visible after commit 250196f1.
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      f24423bd
    • A
      iotests: Resolve test failures caused by hostname · 29926112
      Andreas Färber 提交于
      `hostname -s` may output an errror:
      hostname: Name or service not known
      This causes all tests to fail for `make check-block`.
      
      Suppress such error messages, letting the tests succeed.
      Signed-off-by: NAndreas Färber <afaerber@suse.de>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      29926112
    • L
      qemu-img: let 'qemu-img convert' flush data · 80ccf93b
      Liu Yuan 提交于
      The 'qemu-img convert -h' advertise that the default cache mode is
      'writeback', while in fact it is 'unsafe'.
      
      This patch 1) fix the help manual and 2) let bdrv_close() call bdrv_flush()
      
      2) is needed because some backend storage doesn't have a self-flush
      mechanism(for e.g., sheepdog), so we need to call bdrv_flush() to make
      sure the image is really writen to the storage instead of hanging around
      writeback cache forever.
      Signed-off-by: NLiu Yuan <tailai.ly@taobao.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      80ccf93b
  2. 19 4月, 2012 17 次提交
  3. 18 4月, 2012 6 次提交
    • A
      Merge remote-tracking branch 'origin/master' into staging · 51006bbc
      Anthony Liguori 提交于
      * origin/master:
        Allow controlling volume with PulseAudio backend
        configure: pa_simple is not needed anymore
        Do not use pa_simple PulseAudio API
        audio/spice: add support for volume control
        hw/ac97: add support for volume control
        hw/ac97: the volume mask is not only 0x1f
        hw/ac97: remove USE_MIXER code
        audio: don't apply volume effect if backend has VOICE_VOLUME_CAP
        audio: add VOICE_VOLUME ctl
      51006bbc
    • A
      Merge remote-tracking branch 'spice/spice.v52' into staging · 25b9e14e
      Anthony Liguori 提交于
      * spice/spice.v52:
        qxl-render: fix broken vnc+spice since commit f934493
        qxl: set default values of vram*_size_mb to -1
        trace-events: remove unused qxl_vga_ioport_while_not_in_vga_mode
      25b9e14e
    • A
      Merge remote-tracking branch 'kraxel/usb.46' into staging · b26d712e
      Anthony Liguori 提交于
      * kraxel/usb.46: (21 commits)
        usb-ehci: drop assert()
        usb-redir: Notify our peer when we reject a device due to a speed mismatch
        usb-ehci: Drop unused sofv value
        usb-host: rewrite usb_linux_update_endp_table
        usb: use USBDescriptor for endpoint descriptors.
        usb: use USBDescriptor for interface descriptors.
        usb: use USBDescriptor for config descriptors.
        usb: use USBDescriptor for device qualifier descriptors.
        usb: add USBDescriptor, use for device descriptors.
        usb-ehci: frindex always is a 14 bits counter
        usb-ehci: fix ehci_child_detach
        usb-hub: add tracepoints
        usb_packet_set_state: handle p->ep == NULL
        usb-host: add property to turn off pipelining
        usb-host: add usb packet to request tracepoints
        usb-host: trace canceled requests
        usb-host: trace emulated requests
        Add bootindex support to usb-host and usb-redir
        usb-uhci: queuing fix
        usb-uhci: stop queue filling when we find a in-flight td
        ...
      b26d712e
    • A
      qxl-render: fix broken vnc+spice since commit f934493 · 06ddea49
      Alon Levy 提交于
      Notify any listeners such as vnc that the displaysurface has been
      changed, otherwise they will segfault when first accessing the freed old
      displaysurface data.
      Signed-off-by: NAlon Levy <alevy@redhat.com>
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      06ddea49
    • A
      qxl: set default values of vram*_size_mb to -1 · 79ce3567
      Alon Levy 提交于
      The addition of those values caused a regression where not specifying
      any value for the vram bar size would result in a 4096 _byte_ surface
      area. This is ok for the windows driver but causes the X driver to be
      unusable. Also, it's a regression. This patch returns the default
      behavior of having a 64 megabyte vram BAR.
      Signed-off-by: NAlon Levy <alevy@redhat.com>
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      79ce3567
    • A
      trace-events: remove unused qxl_vga_ioport_while_not_in_vga_mode · a9257af0
      Alon Levy 提交于
      The resulting stp file fails to load because of an unresolvable probe.
      Signed-off-by: NAlon Levy <alevy@redhat.com>
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      a9257af0
  4. 17 4月, 2012 4 次提交