1. 04 12月, 2009 1 次提交
  2. 17 11月, 2009 1 次提交
    • L
      Expose a mechanism to trace block writes · 7cd1e32a
      lirans@il.ibm.com 提交于
      To support live migration without shared storage we need to be able to trace
      writes to disk while migrating. This Patch expose dirty block tracking per
      device to be polled from upper layer.
      
      Changes from v4:
      - Register dirty tracking for each block device.
      - Minor coding style issues.
      - Block.c will now manage a dirty bitmap per device once
        bdrv_set_dirty_tracking() is called. Bitmap is polled by the upper
        layer (block-migration.c).
      Signed-off-by: NLiran Schour <lirans@il.ibm.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      7cd1e32a
  3. 09 11月, 2009 2 次提交
    • M
      Configurable block format whitelist · eb852011
      Markus Armbruster 提交于
      We have code for a quite a few block formats.  While I trust that all
      of these formats are useful at least for some people in some
      circumstances, some of them are of a kind that friends don't let
      friends use in production.
      
      This patch provides an optional block format whitelist, default off.
      If a whitelist is configured with --block-drv-whitelist, QEMU proper
      can use only whitelisted formats.  Other programs, like qemu-img, are
      not affected.
      
      Drivers for formats off the whitelist still participate in format
      probing, to ensure all programs probe exactly the same.  Without that,
      QEMU proper would be prone to treat images with a format off the
      whitelist as raw when the image's format is probed.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      eb852011
    • N
      Added readonly flag to -drive command · 59f2689d
      Naphtali Sprei 提交于
      This is a slightly revised patch for adding readonly flag to the -drive command.
      Even though this patch is "stand-alone", it assumes a previous related patch (in Anthony staging tree), that passes
      the readonly attribute of the drive to the guest OS, applied first.
      
      This enables sharing same image between guests, with readonly access.
      Implementaion mark the drive as read_only and changes the flags when actually opening the file.
      The readonly attribute of a qcow also passed to it's base file.
      For ide that cannot pass the readonly attribute to the guest OS, disallow the readonly flag.
      
      Also, return error code from bdrv_truncate for readonly drive.
      Signed-off-by: NNaphtali Sprei <nsprei@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      59f2689d
  4. 11 9月, 2009 3 次提交
    • C
      block: add aio_flush operation · b2e12bc6
      Christoph Hellwig 提交于
      Instead stalling the VCPU while serving a cache flush try to do it
      asynchronously.  Use our good old helper thread pool to issue an
      asynchronous fdatasync for raw-posix.  Note that while Linux AIO
      implements a fdatasync operation it is not useful for us because
      it isn't actually implement in asynchronous fashion.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      b2e12bc6
    • C
      block: add enable_write_cache flag · e900a7b7
      Christoph Hellwig 提交于
      Add a enable_write_cache flag in the block driver state, and use it to
      decide if we claim to have a volatile write cache that needs controlled
      flushing from the guest.  The flag is off if cache=writethrough is
      defined because O_DSYNC guarantees that every write goes to stable
      storage, and it is on for cache=none and cache=writeback.
      
      Both scsi-disk and ide now use the new flage, changing from their
      defaults of always off (ide) or always on (scsi-disk).
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      e900a7b7
    • K
      Add bdrv_aio_multiwrite · 40b4f539
      Kevin Wolf 提交于
      One performance problem of qcow2 during the initial image growth are
      sequential writes that are not cluster aligned. In this case, when a first
      requests requires to allocate a new cluster but writes only to the first
      couple of sectors in that cluster, the rest of the cluster is zeroed - just
      to be overwritten by the following second request that fills up the cluster.
      
      Let's try to merge sequential write requests to the same cluster, so we can
      avoid to write the zero padding to the disk in the first place.
      
      As a nice side effect, also other formats take advantage of dealing with less
      and larger requests.
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      40b4f539
  5. 28 8月, 2009 1 次提交
    • 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
  6. 16 7月, 2009 1 次提交
  7. 10 7月, 2009 2 次提交
  8. 30 6月, 2009 1 次提交
    • R
      support colon in filenames · 707c0dbc
      Ram Pai 提交于
      Problem: It is impossible to feed filenames with the character colon because
      qemu interprets such names as a protocol. For example filename scsi:0, is
      interpreted as a protocol by name "scsi".
      
      This patch allows user to espace colon characters. For example the above
      filename can now be expressed either as 'scsi\:0' or as file:scsi:0
      
      anything following the "file:" tag is interpreted verbatin. However if "file:"
      tag is omitted then any colon characters in the string must be escaped using
      backslash.
      
      Here are couple of examples:
      
      scsi\:0\:abc is a local file scsi:0:abc
      http\://myweb is a local file by name http://myweb
      file:scsi:0:abc is a local file scsi:0:abc
      file:http://myweb is a local file by name http://mywebSigned-off-by: NRam Pai <linuxram@us.ibm.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      707c0dbc
  9. 17 6月, 2009 1 次提交
  10. 22 5月, 2009 1 次提交
  11. 15 5月, 2009 1 次提交
  12. 22 4月, 2009 1 次提交
  13. 08 4月, 2009 1 次提交
  14. 06 4月, 2009 1 次提交
  15. 29 3月, 2009 2 次提交
  16. 13 3月, 2009 1 次提交
  17. 12 3月, 2009 2 次提交
  18. 06 3月, 2009 4 次提交
  19. 23 1月, 2009 3 次提交
  20. 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
  21. 26 11月, 2008 1 次提交
  22. 09 11月, 2008 1 次提交
  23. 14 10月, 2008 1 次提交
    • A
      Expand cache= option and use write-through caching by default · 9f7965c7
      aliguori 提交于
      This patch changes the cache= option to accept none, writeback, or writethough
      to control the host page cache behavior.  By default, writethrough caching is
      now used which internally is implemented by using O_DSYNC to open the disk
      images.  When using -snapshot, writeback is used by default since data integrity
      it not at all an issue.
      
      cache=none has the same behavior as cache=off previously.  The later syntax is
      still supported by now deprecated.  I also cleaned up the O_DIRECT
      implementation to avoid many of the #ifdefs.
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      
      
      
      git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5485 c046a42c-6fe2-441c-8c8c-71466251a162
      9f7965c7
  24. 06 10月, 2008 1 次提交
  25. 23 9月, 2008 1 次提交
    • A
      Refactor AIO to allow multiple AIO implementations · a76bab49
      aliguori 提交于
      This patch refactors the AIO layer to allow multiple AIO implementations.  It's
      only possible because of the recent signalfd() patch.  
      
      Right now, the AIO infrastructure is pretty specific to the block raw backend.
      For other block devices to implement AIO, the qemu_aio_wait function must
      support registration.  This patch introduces a new function,
      qemu_aio_set_fd_handler, which can be used to register a file descriptor to be
      called back.  qemu_aio_wait() now polls a set of file descriptors registered
      with this function until one becomes readable or writable.
      
      This patch should allow the implementation of alternative AIO backends (via a
      thread pool or linux-aio) and AIO backends in non-traditional block devices
      (like NBD).
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      
      
      
      git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5297 c046a42c-6fe2-441c-8c8c-71466251a162
      a76bab49
  26. 15 9月, 2008 1 次提交
    • A
      Use common objects for qemu-img and qemu-nbd · 03ff3ca3
      aliguori 提交于
      Right now, we sprinkle #if defined(QEMU_IMG) && defined(QEMU_NBD) all over the
      code.  It's ugly and causes us to have to build multiple object files for
      linking against qemu and the tools.
      
      This patch introduces a new file, qemu-tool.c which contains enough for
      qemu-img, qemu-nbd, and QEMU to all share the same objects.
      
      This also required getting qemu-nbd to be a bit more Windows friendly.  I also
      changed the Windows block-raw to use normal IO instead of overlapping IO since
      we don't actually do AIO yet on Windows.  I changed the various #if 0's to
       #if WIN32_AIO to make it easier for someone to eventually fix AIO on Windows.
      
      After this patch, there are no longer any #ifdef's related to qemu-img and
      qemu-nbd.
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      
      
      
      git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5226 c046a42c-6fe2-441c-8c8c-71466251a162
      03ff3ca3
  27. 10 9月, 2008 1 次提交
    • A
      Use signalfd() to work around signal/select race · baf35cb9
      aliguori 提交于
      This patch introduces signalfd() to work around the signal/select race in
      checking for AIO completions.  For platforms that don't support signalfd(), we
      emulate it with threads.
      
      There was a long discussion about this approach.  I don't believe there are any
      fundamental problems with this approach and I believe eliminating the use of
      signals is a good thing.
      
      I've tested Windows and Linux using Windows and Linux guests.  I've also checked
      for disk IO performance regressions.
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      
      
      
      git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5187 c046a42c-6fe2-441c-8c8c-71466251a162
      baf35cb9
  28. 03 7月, 2008 1 次提交
  29. 06 6月, 2008 1 次提交