1. 27 5月, 2009 4 次提交
  2. 22 5月, 2009 2 次提交
  3. 21 5月, 2009 1 次提交
  4. 15 5月, 2009 2 次提交
  5. 14 5月, 2009 1 次提交
  6. 09 5月, 2009 1 次提交
  7. 23 4月, 2009 1 次提交
    • A
      implement qemu_blockalign (Stefano Stabellini) · e268ca52
      aliguori 提交于
      this patch adds a buffer_alignment field to BlockDriverState and
      implements a qemu_blockalign function that uses that field to allocate a
      memory aligned buffer to be used by the block driver.
      buffer_alignment is initialized to 512 but each block driver can set
      a different value (at the moment none of them do).
      This patch modifies ide.c, block-qcow.c, block-qcow2.c and block.c to
      use qemu_blockalign instead of qemu_memalign.
      There is only one place left that still uses qemu_memalign to allocate
      buffers used by block drivers that is posix-aio-compat:handle_aiocb_rw
      because it is not possible to get the BlockDriverState from that
      function. However I think it is not important because posix-aio-compat
      already deals with driver specific code so it is supposed to know its
      own needs.
      Signed-off-by: NStefano Stabellini <stefano.stabellini@eu.citrix.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      
      
      git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7229 c046a42c-6fe2-441c-8c8c-71466251a162
      e268ca52
  8. 22 4月, 2009 4 次提交
  9. 18 4月, 2009 1 次提交
  10. 14 4月, 2009 1 次提交
  11. 08 4月, 2009 2 次提交
  12. 06 4月, 2009 3 次提交
  13. 29 3月, 2009 3 次提交
  14. 12 3月, 2009 3 次提交
  15. 08 3月, 2009 1 次提交
  16. 06 2月, 2009 1 次提交
  17. 23 1月, 2009 3 次提交
  18. 17 1月, 2009 1 次提交
  19. 09 1月, 2009 1 次提交
  20. 08 1月, 2009 2 次提交
  21. 05 12月, 2008 1 次提交
    • A
      Use writeback caching by default with qcow2 · 4dc822d7
      aliguori 提交于
      qcow2 writes a cluster reference count on every cluster update.  This causes
      performance to crater when using anything but cache=writeback.  This is most
      noticeable when using savevm.  Right now, qcow2 isn't a reliable format
      regardless of the type of cache your using because metadata is not updated in
      the correct order.  Considering this, I think it's somewhat reasonable to use
      writeback caching by default with qcow2 files.
      
      It at least avoids the massive performance regression for users until we sort
      out the issues in qcow2. 
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      
      
      
      git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5879 c046a42c-6fe2-441c-8c8c-71466251a162
      4dc822d7
  22. 03 12月, 2008 1 次提交
    • A
      Change order of metadata update to prevent loosing guest data because of... · e976c6a1
      aliguori 提交于
      Change order of metadata update to prevent loosing guest data because of unexpected exit (Gleb Natapov)
      
      Currently the order is this (during cow since it's the interesting case):
      1. Decrement refcount of old clusters
      2. Increment refcount for newly allocated clusters
      3. Copy content of old sectors that will not be rewritten
      4. Update L2 table with pointers to new clusters
      5. Write guest data into new clusters (asynchronously)
      
      There are several problems with this order. The first one is that if qemu
      crashes (or killed or host reboots) after new clusters are linked into L2
      table but before user data is written there, then on the next reboot guest
      will find neither old data nor new one in those sectors and this is not
      what gust expects even when journaling file system is in use.  The other
      problem is that if qemu is killed between steps 1 and 4 then refcount
      of old cluster will be incorrect and may cause snapshot corruption.
      
      The patch change the order to be like this:
      1. Increment refcount for newly allocated clusters
      2. Write guest data into new clusters (asynchronously)
      3. Copy content of old sectors that were not rewritten
      4. Update L2 table with pointers to new clusters
      5. Decrement refcount of old clusters
      
      Unexpected crash may cause cluster leakage, but guest data should be safe.
      Signed-off-by: NGleb Natapov <gleb@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      
      
      
      git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5861 c046a42c-6fe2-441c-8c8c-71466251a162
      e976c6a1