1. 12 8月, 2011 1 次提交
  2. 19 7月, 2011 1 次提交
  3. 26 5月, 2011 15 次提交
  4. 31 1月, 2011 1 次提交
    • M
      blockdev: Fix regression in -drive if=scsi,index=N · 27d6bf40
      Markus Armbruster 提交于
      Before commit 622b520f, index=12 meant bus=1,unit=5.
      
      Since the commit, it means bus=0,unit=12.  The drive is created, but
      not the guest device.  That's because the controllers we use with
      if=scsi drives (lsi53c895a and esp) support only 7 units, and
      scsi_bus_legacy_handle_cmdline() ignores drives with unit numbers
      exceeding that limit.
      
      Changing the mapping of index to bus, unit is a regression.  Breaking
      -drive invocations that used to work just makes it worse.
      
      Revert the part of commit 622b520f that causes this, and clean up
      some.
      
      Note that the fix only affects if=scsi.  You can still put more than 7
      units on a SCSI bus with -device & friends.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      27d6bf40
  5. 25 1月, 2011 1 次提交
  6. 25 11月, 2010 2 次提交
  7. 22 7月, 2010 1 次提交
  8. 02 7月, 2010 2 次提交
    • M
      qdev: Decouple qdev_prop_drive from DriveInfo · f8b6cc00
      Markus Armbruster 提交于
      Make the property point to BlockDriverState, cutting out the DriveInfo
      middleman.  This prepares the ground for block devices that don't have
      a DriveInfo.
      
      Currently all user-defined ones have a DriveInfo, because the only way
      to define one is -drive & friends (they go through drive_init()).
      DriveInfo is closely tied to -drive, and like -drive, it mixes
      information about host and guest part of the block device.  I'm
      working towards a new way to define block devices, with clean
      host/guest separation, and I need to get DriveInfo out of the way for
      that.
      
      Fortunately, the device models are perfectly happy with
      BlockDriverState, except for two places: ide_drive_initfn() and
      scsi_disk_initfn() need to check the DriveInfo for a serial number set
      with legacy -drive serial=...  Use drive_get_by_blockdev() there.
      
      Device model code should now use DriveInfo only when explicitly
      dealing with drives defined the old way, i.e. without -device.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      f8b6cc00
    • M
      scsi: scsi_bus_legacy_handle_cmdline() can fail, fix callers · fa66b909
      Markus Armbruster 提交于
      None of its callers checks for failure.  scsi_hot_add() can crash
      because of that:
      
      (qemu) drive_add 4 if=scsi,format=host_device,file=/dev/sg1
      scsi-generic: scsi generic interface too old
      Segmentation fault (core dumped)
      
      Fix all callers, not just scsi_hot_add().
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      fa66b909
  9. 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
  10. 03 12月, 2009 13 次提交
  11. 09 11月, 2009 1 次提交
  12. 05 10月, 2009 1 次提交