1. 06 7月, 2010 1 次提交
  2. 02 7月, 2010 3 次提交
    • M
      block: Catch attempt to attach multiple devices to a blockdev · 18846dee
      Markus Armbruster 提交于
      For instance, -device scsi-disk,drive=foo -device scsi-disk,drive=foo
      happily creates two SCSI disks connected to the same block device.
      It's all downhill from there.
      
      Device usb-storage deliberately attaches twice to the same blockdev,
      which fails with the fix in place.  Detach before the second attach
      there.
      
      Also catch attempt to delete while a guest device model is attached.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      18846dee
    • 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
  3. 22 6月, 2010 2 次提交
  4. 04 6月, 2010 1 次提交
  5. 16 3月, 2010 2 次提交
  6. 26 12月, 2009 1 次提交
  7. 03 12月, 2009 11 次提交
  8. 09 11月, 2009 1 次提交
  9. 07 10月, 2009 1 次提交
  10. 05 10月, 2009 3 次提交
  11. 10 9月, 2009 1 次提交