1. 08 1月, 2010 1 次提交
  2. 26 12月, 2009 2 次提交
  3. 04 12月, 2009 4 次提交
  4. 30 11月, 2009 1 次提交
  5. 13 11月, 2009 1 次提交
  6. 09 11月, 2009 1 次提交
  7. 30 10月, 2009 1 次提交
  8. 28 10月, 2009 4 次提交
  9. 15 10月, 2009 1 次提交
    • K
      qcow2: Bring synchronous read/write back to life · ef845c3b
      Kevin Wolf 提交于
      When the synchronous read and write functions were dropped, they were replaced
      by generic emulation functions. Unfortunately, these emulation functions don't
      provide the same semantics as the original functions did.
      
      The original bdrv_read would mean that we read some data synchronously and that
      we won't be interrupted during this read. The latter assumption is no longer
      true with the emulation function which needs to use qemu_aio_poll and therefore
      allows the callback of any other concurrent AIO request to be run during the
      read. Which in turn means that (meta)data read earlier could have changed and
      be invalid now. qcow2 is not prepared to work in this way and it's just scary
      how many places there are where other requests could run.
      
      I'm not sure yet where exactly it breaks, but you'll see breakage with virtio
      on qcow2 with a backing file. Providing synchronous functions again fixes the
      problem for me.
      
      Patchworks-ID: 35437
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      ef845c3b
  10. 06 10月, 2009 1 次提交
  11. 05 10月, 2009 1 次提交
    • K
      qcow2: Increase maximum cluster size to 2 MB · 80ee15a6
      Kevin Wolf 提交于
      This patch increases the maximum qcow2 cluster size to 2 MB. Starting with 128k
      clusters, L2 tables span 2 GB or more of virtual disk space, causing 32 bit
      truncation and wraparound of signed integers. Therefore some variables need to
      use a larger data type.
      
      While being at reviewing data types, change some integers that are used for
      array indices to unsigned. In some places they were checked against some upper
      limit but not for negative values. This could avoid potential segfaults with
      corrupted qcow2 images.
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      80ee15a6
  12. 04 10月, 2009 1 次提交
  13. 02 10月, 2009 2 次提交
  14. 01 10月, 2009 1 次提交
  15. 12 9月, 2009 2 次提交
  16. 11 9月, 2009 2 次提交
  17. 10 9月, 2009 3 次提交
    • K
      qcow2: Order concurrent AIO requests on the same unallocated cluster · f214978a
      Kevin Wolf 提交于
      When two AIO requests write to the same cluster, and this cluster is
      unallocated, currently both requests allocate a new cluster and the second one
      merges the first one when it is completed. This means an cluster allocation, a
      read and a cluster deallocation which cause some overhead. If we simply let the
      second request wait until the first one is done, we improve overall performance
      with AIO requests (specifially, qcow2/virtio combinations).
      
      This patch maintains a list of in-flight requests that have allocated new
      clusters. A second request touching the same cluster is limited so that it
      either doesn't touch the allocation of the first request (so it can have a
      non-overlapping allocation) or it waits for the first request to complete.
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      f214978a
    • K
      qcow2: Fix metadata preallocation · ea80b906
      Kevin Wolf 提交于
      The wrong version of the preallocation patch has been applied, so this is the
      remaining diff.
      
      We can't use truncate to grow the image file to the right size because we don't
      know if metadata has been written after the last data cluster. In this case
      truncate would shrink the file and destroy its metadata. Write a zero sector at
      the end of the virtual disk instead to ensure that the file is big enough.
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      ea80b906
    • S
      Fix spelling in comment. · cc2040f8
      Stefan Weil 提交于
      The company which made Virtual PC was Connectix.
      They use the magic string "conectix" in their disk images.
      Signed-off-by: NStefan Weil <weil@mail.berlios.de>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      cc2040f8
  18. 29 8月, 2009 1 次提交
  19. 28 8月, 2009 5 次提交
    • S
      Don't compile aio code if CONFIG_LINUX_AIO is undefined · e44bd6fc
      Stefan Weil 提交于
      This patch fixes linker errors when building QEMU without Linux AIO support.
      
      It is based on suggestions from malc and Kevin Wolf.
      Signed-off-by: NStefan Weil <weil@mail.berlios.de>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      e44bd6fc
    • C
      raw-posix: add Linux native AIO support · 5c6c3a6c
      Christoph Hellwig 提交于
      Now that do have a nicer interface to work against we can add Linux native
      AIO support.  It's an extremly thing layer just setting up an iocb for
      the io_submit system call in the submission path, and registering an
      eventfd with the qemu poll handler to do complete the iocbs directly
      from there.
      
      This started out based on Anthony's earlier AIO patch, but after
      estimated 42,000 rewrites and just as many build system changes
      there's not much left of it.
      
      To enable native kernel aio use the aio=native sub-command on the
      drive command line.  I have also added an option to qemu-io to
      test the aio support without needing a guest.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      5c6c3a6c
    • C
      raw-posix: refactor AIO support · 9ef91a67
      Christoph Hellwig 提交于
      Currently the raw-posix.c code contains a lot of knowledge about the
      asynchronous I/O scheme that is mostly implemented in posix-aio-compat.c.
      All this code does not really belong here and is getting a bit in the
      way of implementing native AIO on Linux.
      
      So instead move all the guts of the AIO implementation into
      posix-aio-compat.c (which might need a better name, btw).
      
      There's now a very small interface between the AIO providers and raw-posix.c:
      
       - an init routine is called from raw_open_common to return an AIO context
         for this drive.  An AIO implementation may either re-use one context
         for all drives, or use a different one for each as the Linux native
         AIO support will do.
       - an submit routine is called from the aio_reav/writev methods to submit
         an AIO request
      
      There are no indirect calls involved in this interface as we need to
      decide which one to call manually.  We will only call the Linux AIO native
      init function if we were requested to by vl.c, and we will only call
      the native submit function if we are asked to and the request is properly
      aligned.  That's also the reason why the alignment check actually does
      the inverse move and now goes into raw-posix.c.
      
      The old posix-aio-compat.h headers is removed now that most of it's
      content is private to posix-aio-compat.c, and instead we add a new
      block/raw-posix-aio.h headers is created containing only the tiny interface
      between raw-posix.c and the AIO implementation.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      9ef91a67
    • K
      qcow2: Metadata preallocation · a35e1c17
      Kevin Wolf 提交于
      This introduces a qemu-img create option for qcow2 which allows the metadata to
      be preallocated, i.e. clusters are reserved in the refcount table and L1/L2
      tables, but no data is written to them. Metadata is quite small, so this
      happens in almost no time.
      
      Especially with qcow2 on virtio this helps to gain a bit of performance during
      the initial writes. However, as soon as create a snapshot, we're back to the
      normal slow speed, obviously. So this isn't the real fix, but kind of a cheat
      while we're still having trouble with qcow2 on virtio.
      
      Note that the option is disabled by default and needs to be specified
      explicitly using qemu-img create -f qcow2 -o preallocation=metadata.
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      a35e1c17
    • S
      block/vdi.c: Fix several bugs · 6eea90eb
      Stefan Weil 提交于
      * The code for option '-static' was wrong, so image creation
        always created static images.
      
      * Static images created with qemu-img did not set header entry
        blocks_allocated.
      
      * The size of the block map must be rounded to the next multiple
        of SECTOR_SIZE, otherwise the block map is only read partially
        for block map sizes which are not a multiple of SECTOR_SIZE.
      Signed-off-by: NStefan Weil <weil@mail.berlios.de>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      6eea90eb
  20. 24 8月, 2009 2 次提交
  21. 15 8月, 2009 1 次提交
  22. 11 8月, 2009 1 次提交
  23. 01 8月, 2009 1 次提交