1. 16 3月, 2010 1 次提交
  2. 11 2月, 2010 1 次提交
    • C
      block: add topology qdev properties · 428c149b
      Christoph Hellwig 提交于
      Add three new qdev properties to export block topology information to
      the guest.  This is needed to get optimal I/O alignment for RAID arrays
      or SSDs.
      
      The options are:
      
       - physical_block_size to specify the physical block size of the device,
         this is going to increase from 512 bytes to 4096 kilobytes for many
         modern storage devices
       - min_io_size to specify the minimal I/O size without performance impact,
         this is typically set to the RAID chunk size for arrays.
       - opt_io_size to specify the optimal sustained I/O size, this is
         typically the RAID stripe width for arrays.
      
      I decided to not auto-probe these values from blkid which might easily
      be possible as I don't know how to deal with these issues on migration.
      
      Note that we specificly only set the physical_block_size, and not the
      logial one which is the unit all I/O is described in.  The reason for
      that is that IDE does not support increasing the logical block size and
      at last for now I want to stick to one meachnisms in queue and allow
      for easy switching of transports for a given backing image which would
      not be possible if scsi and virtio use real 4k sectors, while ide only
      uses the physical block exponent.
      
      To make this more common for the different block drivers introduce a
      new BlockConf structure holding all common block properties and a
      DEFINE_BLOCK_PROPERTIES macro to add them all together, mirroring
      what is done for network drivers.  Also switch over all block drivers
      to use it, except for the floppy driver which has weird driveA/driveB
      properties and probably won't require any advanced block options ever.
      
      Example usage for a virtio device with 4k physical block size and
      8k optimal I/O size:
      
        -drive file=scratch.img,media=disk,cache=none,id=scratch \
        -device virtio-blk-pci,drive=scratch,physical_block_size=4096,opt_io_size=8192
      
      aliguori: updated patch to take into account BLOCK events
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      428c149b
  3. 03 12月, 2009 11 次提交
  4. 02 12月, 2009 1 次提交
  5. 09 11月, 2009 1 次提交
  6. 05 10月, 2009 2 次提交
  7. 10 9月, 2009 1 次提交
  8. 14 5月, 2009 1 次提交
  9. 29 3月, 2009 1 次提交
    • A
      new scsi-generic abstraction, use SG_IO (Christoph Hellwig) · 221f715d
      aliguori 提交于
      Okay, I started looking into how to handle scsi-generic I/O in the
      new world order.
      
      I think the best is to use the SG_IO ioctl instead of the read/write
      interface as that allows us to support scsi passthrough on disk/cdrom
      devices, too.  See Hannes patch on the kvm list from August for an
      example.
      
      Now that we always do ioctls we don't need another abstraction than
      bdrv_ioctl for the synchronous requests for now, and for asynchronous
      requests I've added a aio_ioctl abstraction keeping it simple.
      
      Long-term we might want to move the ops to a higher-level abstraction
      and let the low-level code fill out the request header, but I'm lazy
      enough to leave that to the people trying to support scsi-passthrough
      on a non-Linux OS.
      
      Tested lightly by issuing various sg_ commands from sg3-utils in a guest
      to a host CDROM device.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      
      
      git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6895 c046a42c-6fe2-441c-8c8c-71466251a162
      221f715d
  10. 13 3月, 2009 1 次提交
  11. 17 10月, 2008 1 次提交
    • A
      scsi-generic: correct error management · 89c0f643
      aurel32 提交于
      this patch allows to fully use a tape device connected to qemu through
      the scsi-generic interface.
      
      Previous patch introduced tape SCSI commands management, this one
      improve error case management:
      
      - the SCSI controller command completion must be called with the status
      value, not the sense value. In the case of scsi-generic, the SCSI status
      is given by the field status of sg_io_hdr_t (the value is left shifted
      by one regarding status codes defined in /usr/include/scsi/scsi.h)
      
      - when a read is aborted due to a mark/EOF/EOD/EOM, the len reported to
      controller can be 0. LSI controller emulation doesn't know how to manage
      this. A workaround found is to call the completion routine with
      SCSI_REASON_DONE just after calling it with SCSI_REASON_DATA with len=0.
      
      This patch also manages correctly the block size of the tape device.
      
      This patch has been tested with a real tape device "HP C5683A", linux
      guest (debian etch) and tools like "mt", "tar" and "btape".
      
      Windows guest is not better supported than before...
      Signed-off-by: NLaurent Vivier <Laurent.Vivier@bull.net>
      Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
      
      git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5497 c046a42c-6fe2-441c-8c8c-71466251a162
      89c0f643
  12. 23 9月, 2008 1 次提交
  13. 22 9月, 2008 2 次提交
  14. 02 9月, 2008 1 次提交
  15. 25 12月, 2007 1 次提交