1. 22 10月, 2010 9 次提交
    • K
      qemu-img: Fix qemu-img convert -obacking_file · a18953fb
      Kevin Wolf 提交于
      The old -B option caused a backing file to be used for the converted image and
      to avoid copying clusters from the old backing file. When replaced with
      -obacking_file, qemu-img convert does assign the backing file to the new image,
      but it doesn't realize that it should avoid copying clusters from the backing
      file.
      
      This patch checks the -o options for a backing_file and applies the same logic
      as for -B in this case.
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      a18953fb
    • S
      block: Use GCC_FMT_ATTR and fix a format error · a77cffe7
      Stefan Weil 提交于
      Adding the gcc format attribute detects a format bug
      which is fixed here.
      
      v2:
      Don't use type cast. BDRV_SECTOR_SIZE is unsigned long long,
      so %lld should be the correct format specifier.
      
      Cc: Blue Swirl <blauwirbel@gmail.com>
      Cc: Kevin Wolf <kwolf@redhat.com>
      Signed-off-by: NStefan Weil <weil@mail.berlios.de>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      a77cffe7
    • K
      qemu-io: New command map · 191c2890
      Kevin Wolf 提交于
      The new map command in qemu-io lists all allocated/unallocated areas in an
      image file.
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      191c2890
    • E
      Copy snapshots out of QCOW2 disk · 51ef6727
      edison 提交于
      In order to backup snapshots, created from QCOW2 iamge, we want to copy snapshots out of QCOW2 disk to a seperate storage.
      The following patch adds a new option in "qemu-img": qemu-img convert -f qcow2 -O qcow2 -s snapshot_name src_img bck_img.
      Right now, it only supports to copy the full snapshot, delta snapshot is on the way.
      
      Changes from V1: all the comments from Kevin are addressed:
      Add read-only checking
      Fix coding style
      Change the name from bdrv_snapshot_load to bdrv_snapshot_load_tmp
      Signed-off-by: NDisheng Su <edison@cloud.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      51ef6727
    • C
      ide: set WCACHE supported in IDENTIFY data · a58b8d54
      Christoph Hellwig 提交于
      ATA does not only have the WCACHE enabled bit in identify word 85, but also
      a WCACHE supported bit in word 82.  While the Linux kernel is fine with the
      latter at least hdparm also needs the former before correctly displaying
      the cache settings.  There's also a non-zero chance other operating systems
      are more picky in their volatile write cache detection.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      a58b8d54
    • K
      qcow2: Remove old image creation function · 9b036055
      Kevin Wolf 提交于
      They have been #ifdef'd out by the previous patch.
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      9b036055
    • K
      qcow2: Simplify image creation · a9420734
      Kevin Wolf 提交于
      Instead of doing lots of magic for setting up initial refcount blocks and stuff
      create a minimal (inconsistent) image, open it and initialize the rest with
      regular qcow2 functions.
      
      This is a complete rewrite of the image creation function. The old
      implementating is #ifdef'd out and will be removed by the next patch (removing
      it here would have made the diff unreadable because diff tries to find
      similarities when it's really a rewrite)
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      a9420734
    • S
      qcow2: Support exact L1 table growth · 72893756
      Stefan Hajnoczi 提交于
      The L1 table grow operation includes a size calculation that bumps up
      the new L1 table size in order to anticipate the size needs of vmstate
      data.  This helps reduce the number of times that the L1 table has to be
      grown when vmstate data is appended.
      
      This size overhead is not necessary during image creation,
      bdrv_truncate(), or snapshot goto operations.  In fact, existing
      qemu-iotests that exercise table growth are no longer able to trigger it
      because image creation preallocates an L1 table that is too large after
      changes to qcow_create2().
      
      This patch keeps the size calculation but also adds exact growth for
      callers that do not want to inflate the L1 table size unnecessarily.
      Signed-off-by: NStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      72893756
    • S
      curses: Fix control-{@[\]^_} and ESC · d03703c8
      Samuel Thibault 提交于
      control-{@[\]^_} shouldn't get the 'a' - 'A' offset for correct
      translation. ESC is better simulated as escape key.
      Signed-off-by: NSamuel Thibault <samuel.thibault@ens-lyon.org>
      Signed-off-by: NAndrew Zaborowski <balrogg@gmail.com>
      d03703c8
  2. 21 10月, 2010 31 次提交