1. 12 9月, 2009 1 次提交
    • B
      Fix sys-queue.h conflict for good · 72cf2d4f
      Blue Swirl 提交于
      Problem: Our file sys-queue.h is a copy of the BSD file, but there are
      some additions and it's not entirely compatible. Because of that, there have
      been conflicts with system headers on BSD systems. Some hacks have been
      introduced in the commits 15cc9235,
      f40d7537,
      96555a96 and
      3990d09a but the fixes were fragile.
      
      Solution: Avoid the conflict entirely by renaming the functions and the
      file. Revert the previous hacks.
      Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
      72cf2d4f
  2. 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
  3. 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
  4. 28 7月, 2009 1 次提交
  5. 16 7月, 2009 1 次提交
  6. 11 7月, 2009 1 次提交
  7. 10 7月, 2009 1 次提交
  8. 02 7月, 2009 1 次提交
  9. 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
  10. 17 6月, 2009 2 次提交
  11. 15 6月, 2009 2 次提交
    • C
      block: add bdrv_probe_device method · 508c7cb3
      Christoph Hellwig 提交于
      Add a bdrv_probe_device method to all BlockDriver instances implementing
      host devices to move matching of host device types into the actual drivers.
      For now we keep exacly the old matching behaviour based on the devices names,
      although we really should have better detetion methods based on device
      information in the future.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      508c7cb3
    • C
      raw-posix: split hdev drivers · f3a5d3f8
      Christoph Hellwig 提交于
      Instead of declaring one BlockDriver for all host devices declared one
      for each type:  a generic one for normal disk devices, a Linux floppy
      driver and a CDROM driver for Linux and FreeBSD.  This gets rid of a lot
      of messy ifdefs and switching based on the type in the various removal
      device methods.
      
      block.c grows a new method to find the correct host device driver based
      on OS-sepcific criteria, which will later into the actual drivers in a
      later patch in this series.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      f3a5d3f8
  12. 27 5月, 2009 2 次提交
  13. 22 5月, 2009 2 次提交
  14. 15 5月, 2009 1 次提交
  15. 09 5月, 2009 1 次提交
  16. 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
  17. 22 4月, 2009 1 次提交
  18. 14 4月, 2009 1 次提交
  19. 08 4月, 2009 3 次提交
  20. 06 4月, 2009 1 次提交
  21. 29 3月, 2009 5 次提交
  22. 21 3月, 2009 3 次提交
  23. 13 3月, 2009 3 次提交
  24. 12 3月, 2009 1 次提交