1. 03 Aug, 2010 3 commits
    • Yoshiaki Tamura's avatar
      bd0858bb
    • Miguel Di Ciurcio Filho's avatar
      loadvm: improve tests before bdrv_snapshot_goto() · f0aa7a8b
      Miguel Di Ciurcio Filho authored
      
      
      This patch improves the resilience of the load_vmstate() function, doing
      further and better ordered tests.
      
      In load_vmstate(), if there is any error on bdrv_snapshot_goto(), except if the
      error is on VM state device, load_vmstate() will return zero and the VM will be
      started with major corruption chances.
      
      The current process:
      - test if there is any writable device without snapshot support
          - if exists return -error
      - get the device that saves the VM state, possible return -error but unlikely
      because it was tested earlier
      - flush I/O
      - run bdrv_snapshot_goto() on devices
          - if fails, give an warning and goes to the next (not good!)
          - if fails on the VM state device, return zero (not good!)
      - check if the requested snapshot exists on the device that saves the VM state
      and the state is not zero
          - if fails return -error
      - open the file with the VM state
          - if fails return -error
      - load the VM state
          - if fails return -error
      - return zero
      
      New behavior:
      - get the device that saves the VM state
          - if fails return -error
      - check if the requested snapshot exists on the device that saves the VM state
      and the state is not zero
          - if fails return -error
      - test if there is any writable device without snapshot support
          - if exists return -error
      - test if the devices with snapshot support have the requested snapshot
          - if anyone fails, return -error
      - flush I/O
      - run snapshot_goto() on devices
          - if anyone fails, return -error
      - open the file with the VM state
          - if fails return -error
      - load the VM state
          - if fails return -error
      - return zero
      
      do_loadvm must not call vm_start if any error has occurred in load_vmstate.
      
      Signed-off-by: default avatarMiguel Di Ciurcio Filho <miguel.filho@gmail.com>
      Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
      f0aa7a8b
    • Kevin Wolf's avatar
      block: Change bdrv_commit to handle multiple sectors at once · 8a426614
      Kevin Wolf authored
      
      
      bdrv_commit copies the image to its backing file sector by sector, which
      is (surprise!) relatively slow. Let's take a larger buffer and handle more
      sectors at once if possible.
      
      With a 1G qcow2 file, this brought the time bdrv_commit takes down from
      5:06 min to 1:14 min for me.
      
      Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
      8a426614
  2. 02 Aug, 2010 1 commit
  3. 31 Jul, 2010 6 commits
  4. 30 Jul, 2010 12 commits
  5. 29 Jul, 2010 15 commits
  6. 28 Jul, 2010 1 commit
  7. 27 Jul, 2010 2 commits
    • Blue Swirl's avatar
      Fix mingw32 build · 249cdb42
      Blue Swirl authored
      
      
      Fix mingw32 build errors like
      /src/qemu/ui/vnc-enc-tight.c: In function 'tight_detect_smooth_image24':
      /src/qemu/ui/vnc-enc-tight.c:119: error: 'uint' undeclared (first use in this function)
      
      Replace 'uint' with proper 'unsigned int'.
      
      Signed-off-by: default avatarBlue Swirl <blauwirbel@gmail.com>
      249cdb42
    • Blue Swirl's avatar
      Initialize a variable in all cases · d167f9bc
      Blue Swirl authored
      
      
      Fix a warning with some GCCs:
      /src/qemu/ui/vnc-enc-tight.c: In function `send_sub_rect_nojpeg':
      /src/qemu/ui/vnc-enc-tight.c:1458: warning: `ret' might be used uninitialized in this function
      
      Signed-off-by: default avatarBlue Swirl <blauwirbel@gmail.com>
      d167f9bc