1. 30 1月, 2013 1 次提交
  2. 26 1月, 2013 3 次提交
  3. 19 12月, 2012 4 次提交
  4. 21 11月, 2012 1 次提交
    • S
      vdi: don't override libuuid symbols · 8ba2aae3
      Stefan Hajnoczi 提交于
      It's poor symbol hygiene to provide a global symbols that collide with a
      common library like libuuid.  If QEMU links against a shared library
      that depends on uuid_generate() it can end up calling our stub version
      of the function.
      
      This exact scenario happened with GlusterFS libgfapi.so, which depends
      on libglusterfs.so's uuid_generate().
      
      Scope the uuid stubs for vdi.c only and avoid affecting other shared
      objects.
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      Reviewed-by: NKevin Wolf <kwolf@redhat.com>
      8ba2aae3
  5. 24 9月, 2012 1 次提交
  6. 12 9月, 2012 1 次提交
    • S
      vdi: Fix warning from clang · 514f21a5
      Stefan Weil 提交于
      ccc-analyzer reports these warnings:
      
      block/vdi.c:704:13: warning: Dereference of null pointer
                  bmap[i] = VDI_UNALLOCATED;
                  ^
      block/vdi.c:702:13: warning: Dereference of null pointer
                  bmap[i] = i;
                  ^
      
      Moving some code into the if block fixes this.
      It also avoids calling function write with 0 bytes of data.
      Signed-off-by: NStefan Weil <sw@weilnetz.de>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      514f21a5
  7. 15 8月, 2012 1 次提交
  8. 15 6月, 2012 1 次提交
    • K
      qemu-img check -r for repairing images · 4534ff54
      Kevin Wolf 提交于
      The QED block driver already provides the functionality to not only
      detect inconsistencies in images, but also fix them. However, this
      functionality cannot be manually invoked with qemu-img, but the
      check happens only automatically during bdrv_open().
      
      This adds a -r switch to qemu-img check that allows manual invocation
      of an image repair.
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      4534ff54
  9. 05 4月, 2012 8 次提交
  10. 26 1月, 2012 1 次提交
  11. 15 12月, 2011 2 次提交
  12. 05 12月, 2011 1 次提交
  13. 24 11月, 2011 2 次提交
  14. 11 11月, 2011 1 次提交
  15. 29 10月, 2011 1 次提交
    • E
      Teach block/vdi about "discarded" (no longer allocated) blocks · c794b4e0
      Eric Sunshine 提交于
      An entry in the VDI block map will hold an offset to the actual block if
      the block is allocated, or one of two specially-interpreted values if
      not allocated. Using VirtualBox terminology, value VDI_IMAGE_BLOCK_FREE
      (0xffffffff) represents a never-allocated block (semantically arbitrary
      content).  VDI_IMAGE_BLOCK_ZERO (0xfffffffe) represents a "discarded"
      block (semantically zero-filled).  block/vdi knows only about
      VDI_IMAGE_BLOCK_FREE.  Teach it about VDI_IMAGE_BLOCK_ZERO.
      Signed-off-by: NEric Sunshine <sunshine@sunshineco.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      c794b4e0
  16. 21 10月, 2011 1 次提交
  17. 21 8月, 2011 1 次提交
  18. 15 6月, 2011 1 次提交
  19. 08 6月, 2011 1 次提交
    • K
      qemu-img create: Fix displayed default cluster size · 99cce9fa
      Kevin Wolf 提交于
      When not specifying a cluster size on the command line, qemu-img printed
      a cluster size of 0:
      
          Formatting '/tmp/test.qcow2', fmt=qcow2 size=67108864
          encryption=off cluster_size=0
      
      This patch adds the default cluster size to the QEMUOptionParameter list, so
      that it displays the default value that is used.
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      99cce9fa
  20. 04 4月, 2011 1 次提交
  21. 15 3月, 2011 1 次提交
  22. 07 2月, 2011 1 次提交
    • S
      block/vdi: Fix wrong size in conditionally used memset, memcmp · 4f3669ea
      Stefan Weil 提交于
      Error report from cppcheck:
      block/vdi.c:122: error: Using sizeof for array given as function argument returns the size of pointer.
      block/vdi.c:128: error: Using sizeof for array given as function argument returns the size of pointer.
      
      Fix both by setting the correct size.
      
      The buggy code is only used when QEMU is build without uuid support.
      The bug is not critical, so there is no urgent need to apply it to
      old versions of QEMU.
      
      Cc: Kevin Wolf <kwolf@redhat.com>
      Signed-off-by: NStefan Weil <weil@mail.berlios.de>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      4f3669ea
  23. 25 11月, 2010 1 次提交
  24. 04 11月, 2010 1 次提交
  25. 06 7月, 2010 1 次提交
  26. 17 5月, 2010 1 次提交
    • S
      block/vdi: Fix image opening and creation for odd disk sizes · f21dc3a4
      Stefan Weil 提交于
      The fix is based on a patch from Kevin Wolf. Here his comment:
      
      "The number of blocks needs to be rounded up to cover all of the virtual hard
      disk. Without this fix, we can't even open our own images if their size is not
      a multiple of the block size."
      
      While Kevin's patch addressed vdi_create, my modification also fixes
      vdi_open which now accepts images with odd disk sizes.
      
      v3:
      Don't allow reading of disk images with too large disk sizes.
      Neither VBoxManage nor old versions of qemu-img read such images.
      This change requires rounding of odd disk sizes before we do the checks.
      
      Cc: Kevin Wolf <kwolf@redhat.com>
      Cc: François Revol <revol@free.fr>
      Signed-off-by: NStefan Weil <weil@mail.berlios.de>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      f21dc3a4