1. 06 12月, 2013 1 次提交
  2. 05 12月, 2013 2 次提交
  3. 04 12月, 2013 3 次提交
  4. 03 12月, 2013 11 次提交
  5. 30 11月, 2013 2 次提交
  6. 29 11月, 2013 7 次提交
  7. 28 11月, 2013 9 次提交
  8. 14 11月, 2013 2 次提交
    • P
      qcow2: fix possible corruption when reading multiple clusters · 78a52ad5
      Peter Lieven 提交于
      if multiple sectors spanning multiple clusters are read the
      function count_contiguous_clusters should ensure that the
      cluster type should not change between the clusters.
      
      Especially the for-loop should break when we have one
      or more normal clusters followed by a compressed cluster.
      
      Unfortunately the wrong macro was used in the mask to
      compare the flags.
      
      This was discovered while debugging a data corruption
      issue when converting a compressed qcow2 image to raw.
      qemu-img reads 2MB chunks which span multiple clusters.
      
      CC: qemu-stable@nongnu.org
      Signed-off-by: NPeter Lieven <pl@kamp.de>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      78a52ad5
    • F
      block: Print its file name if backing file opening failed · b04b6b6e
      Fam Zheng 提交于
      If backing file doesn't exist, the error message is confusing and
      misleading:
      
          $ qemu /tmp/a.qcow2
          qemu: could not open disk image /tmp/a.qcow2: Could not open file: No
          such file or directory
      
      But...
      
          $ ls /tmp/a.qcow2
          /tmp/a.qcow2
      
          $ qemu-img info /tmp/a.qcow2
          image: /tmp/a.qcow2
          file format: qcow2
          virtual size: 8.0G (8589934592 bytes)
          disk size: 196K
          cluster_size: 65536
          backing file: /tmp/b.qcow2
      
      Because...
      
          $ ls /tmp/b.qcow2
          ls: cannot access /tmp/b.qcow2: No such file or directory
      
      This is not intuitive. It's better to have the missing file's name in
      the error message. With this patch:
      
          $ qemu-io -c 'read 0 512' /tmp/a.qcow2
          qemu-io: can't open device /tmp/a.qcow2: Could not open backing
          file: Could not open '/stor/vm/arch.raw': No such file or directory
          no file open, try 'help open'
      
      Which is a little bit better.
      Signed-off-by: NFam Zheng <famz@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      b04b6b6e
  9. 07 11月, 2013 3 次提交
    • J
      block: vhdx - add .bdrv_create() support · 3412f7b1
      Jeff Cody 提交于
      This adds support for VHDX image creation, for images of type "Fixed"
      and "Dynamic".  "Differencing" types (i.e., VHDX images with backing
      files) are currently not supported.
      
      Options for image creation include:
          * log size:
              The size of the journaling log for VHDX.  Minimum is 1MB,
              and it must be a multiple of 1MB. Invalid log sizes will be
              silently fixed by rounding up to the nearest MB.
      
              Default is 1MB.
      
          * block size:
              This is the size of a payload block.  The range is 1MB to 256MB,
              inclusive, and must be a multiple of 1MB as well.  Invalid sizes
              and multiples will be silently fixed.  If '0' is passed, then
              a sane size is chosen (depending on virtual image size).
      
              Default is 0 (Auto-select).
      
          * subformat:
              - "dynamic"
                  An image without data pre-allocated.
              - "fixed"
                  An image with data pre-allocated.
      
              Default is "dynamic"
      
      When creating the image file, the lettered sections are created:
      
      -----------------------------------------------------------------.
      |   (A)    |   (B)    |    (C)    |     (D)       |     (E)
      |  File ID |  Header1 |  Header 2 |  Region Tbl 1 |  Region Tbl 2
      |          |          |           |               |
      .-----------------------------------------------------------------.
      0         64KB      128KB       192KB           256KB          320KB
      
      .---- ~ ----------- ~ ------------ ~ ---------------- ~ -----------.
      |     (F)     |     (G)       |    (H)    |
      | Journal Log |  BAT / Bitmap |  Metadata |  .... data ......
      |             |               |           |
      .---- ~ ----------- ~ ------------ ~ ---------------- ~ -----------.
      1MB         (var.)          (var.)      (var.)
      Signed-off-by: NJeff Cody <jcody@redhat.com>
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      3412f7b1
    • J
      block: vhdx - fix comment typos in header, fix incorrect struct fields · 61c02e56
      Jeff Cody 提交于
      VHDXPage83Data and VHDXParentLocatorHeader both incorrectly had their
      MSGUID fields set as arrays of 16.  This is incorrect (it stems from
      an early version where those fields were uint_8 arrays).  Those fields
      were, up to this patch, unused.
      
      Also, there were a couple of typos and incorrect wording in comments,
      and those have been fixed up as well.
      Signed-off-by: NJeff Cody <jcody@redhat.com>
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      61c02e56
    • J
      block: vhdx - break out code operations to functions · 1e74a971
      Jeff Cody 提交于
      This is preperation for vhdx_create().  The ability to write headers,
      and calculate the number of BAT entries will be needed within the
      create() functions, so move this relevant code into helper functions.
      Signed-off-by: NJeff Cody <jcody@redhat.com>
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      1e74a971