1. 11 9月, 2009 2 次提交
    • 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
  2. 28 8月, 2009 1 次提交
    • 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
  3. 16 7月, 2009 1 次提交
  4. 15 6月, 2009 1 次提交
    • 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
  5. 27 5月, 2009 1 次提交
  6. 22 5月, 2009 2 次提交
  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 1 次提交
  9. 08 4月, 2009 1 次提交
  10. 06 4月, 2009 1 次提交
  11. 29 3月, 2009 2 次提交
  12. 21 3月, 2009 1 次提交
  13. 13 3月, 2009 2 次提交
  14. 06 3月, 2009 1 次提交
    • A
      monitor: Rework early disk password inquiry (Jan Kiszka) · c0f4ce77
      aliguori 提交于
      Reading the passwords for encrypted hard disks during early startup is
      broken (I guess for quiet a while now):
       - No monitor terminal is ready for input at this point
       - Forcing all mux'ed terminals into monitor mode can confuse other
         users of that channels
      
      To overcome these issues and to lay the ground for a clean decoupling of
      monitor terminals, this patch changes the initial password inquiry as
      follows:
       - Prevent autostart if there is some encrypted disk
       - Once the user tries to resume the VM, prompt for all missing
         passwords
       - Only resume if all passwords were accepted
      Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      
      
      git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6707 c046a42c-6fe2-441c-8c8c-71466251a162
      c0f4ce77
  15. 04 3月, 2009 1 次提交
    • A
      Fix CVE-2008-0928 - insufficient block device address range checking (Anthony Liguori) · 71d0770c
      aliguori 提交于
      Introduce a growable flag that's set by bdrv_file_open().  Block devices should
      never be growable, only files that are being used by block devices.
      
      I went through Fabrice's early comments about the patch that was first applied.
      While I disagree with that patch, I also disagree with Fabrice's suggestion.
      
      There's no good reason to do the checks in the block drivers themselves.  It
      just increases the possibility that this bug could show up again.  Since we're
      calling bdrv_getlength() to determine the length, we're giving the block drivers
      a chance to chime in and let us know what range is valid.
      
      Basically, this patch makes the BlockDriver API guarantee that all requests are
      within 0..bdrv_getlength() which to me seems like a Good Thing.
      
      What do others think?
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      
      
      git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6677 c046a42c-6fe2-441c-8c8c-71466251a162
      71d0770c
  16. 11 2月, 2009 1 次提交
  17. 09 11月, 2008 1 次提交
  18. 18 9月, 2008 1 次提交
  19. 12 3月, 2008 2 次提交
  20. 25 12月, 2007 1 次提交
  21. 02 12月, 2007 1 次提交
  22. 11 11月, 2007 1 次提交
  23. 17 9月, 2007 3 次提交
  24. 19 8月, 2006 1 次提交
  25. 07 8月, 2006 1 次提交
  26. 06 8月, 2006 2 次提交
  27. 02 8月, 2006 1 次提交
  28. 04 6月, 2006 1 次提交
  29. 19 12月, 2005 1 次提交
  30. 16 11月, 2004 1 次提交
  31. 19 9月, 2004 1 次提交
  32. 02 8月, 2004 1 次提交