1. 17 6月, 2009 1 次提交
  2. 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
  3. 27 5月, 2009 2 次提交
  4. 22 5月, 2009 2 次提交
  5. 15 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 1 次提交
  9. 14 4月, 2009 1 次提交
  10. 08 4月, 2009 3 次提交
  11. 06 4月, 2009 1 次提交
  12. 29 3月, 2009 5 次提交
  13. 21 3月, 2009 3 次提交
  14. 13 3月, 2009 3 次提交
  15. 12 3月, 2009 2 次提交
  16. 09 3月, 2009 1 次提交
  17. 08 3月, 2009 2 次提交
  18. 06 3月, 2009 7 次提交
  19. 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