1. 29 1月, 2016 1 次提交
  2. 12 11月, 2015 1 次提交
  3. 04 11月, 2015 1 次提交
  4. 15 8月, 2015 1 次提交
  5. 30 7月, 2015 2 次提交
  6. 24 7月, 2015 1 次提交
    • M
      scsi: Handle no media case for scsi_get_configuration · 7d99f4c1
      Matthew Rosato 提交于
      Currently, scsi_get_configuration always returns a current
      profile (DVD or CD), even when there is actually no media present.
      By comparison, ide/atapi uses a default profile of 0 (MMC_PROFILE_NONE)
      for this case and checks for tray_open, so let's do the same for scsi.
      
      This fixes a problem I'm seeing with Fedora 22 guests where systemd
      cdrom_id fails to unmount after a QEMU-initiated eject against a
      scsi cdrom device because it believes the media is still present
      (but unreadable).
      Signed-off-by: NMatthew Rosato <mjrosato@linux.vnet.ibm.com>
      Message-Id: <1436986352-10695-1-git-send-email-mjrosato@linux.vnet.ibm.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      7d99f4c1
  7. 10 3月, 2015 2 次提交
  8. 15 12月, 2014 1 次提交
  9. 31 10月, 2014 2 次提交
  10. 20 10月, 2014 2 次提交
    • M
      blockdev: Fix blockdev-add not to create DriveInfo · 26f8b3a8
      Markus Armbruster 提交于
      blockdev_init() always creates a DriveInfo, but only drive_new() fills
      it in.  qmp_blockdev_add() leaves it blank.  This results in a drive
      with type = IF_IDE, bus = 0, unit = 0.  Screwed up in commit ee13ed1c.
      
      Board initialization code looking for IDE drive (0,0) can pick up one
      of these bogus drives.  The QMP command has to execute really early to
      be visible.  Not sure how likely that is in practice.
      
      Fix by creating DriveInfo in drive_new().  Block backends created by
      blockdev-add don't get one.
      
      Breaks the test for "has been created by qmp_blockdev_add()" in
      blockdev_mark_auto_del() and do_drive_del(), because it changes the
      value of dinfo && !dinfo->enable_auto_del from true to false.  Simply
      test !dinfo instead.
      
      Leaves DriveInfo member enable_auto_del unused.  Drop it.
      
      A few places assume a block backend always has a DriveInfo.  Fix them
      up.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NMax Reitz <mreitz@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      26f8b3a8
    • M
      hw: Convert from BlockDriverState to BlockBackend, mostly · 4be74634
      Markus Armbruster 提交于
      Device models should access their block backends only through the
      block-backend.h API.  Convert them, and drop direct includes of
      inappropriate headers.
      
      Just four uses of BlockDriverState are left:
      
      * The Xen paravirtual block device backend (xen_disk.c) opens images
        itself when set up via xenbus, bypassing blockdev.c.  I figure it
        should go through qmp_blockdev_add() instead.
      
      * Device model "usb-storage" prompts for keys.  No other device model
        does, and this one probably shouldn't do it, either.
      
      * ide_issue_trim_cb() uses bdrv_aio_discard() instead of
        blk_aio_discard() because it fishes its backend out of a BlockAIOCB,
        which has only the BlockDriverState.
      
      * PC87312State has an unused BlockDriverState[] member.
      
      The next two commits take care of the latter two.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NMax Reitz <mreitz@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      4be74634
  11. 15 10月, 2014 2 次提交
  12. 30 9月, 2014 3 次提交
  13. 10 9月, 2014 2 次提交
    • B
      block: Make the block accounting functions operate on BlockAcctStats · 5366d0c8
      Benoît Canet 提交于
      This is the next step for decoupling block accounting functions from
      BlockDriverState.
      In a future commit the BlockAcctStats structure will be moved from
      BlockDriverState to the device models structures.
      
      Note that bdrv_get_stats was introduced so device models can retrieve the
      BlockAcctStats structure of a BlockDriverState without being aware of it's
      layout.
      This function should go away when BlockAcctStats will be embedded in the device
      models structures.
      
      CC: Kevin Wolf <kwolf@redhat.com>
      CC: Stefan Hajnoczi <stefanha@redhat.com>
      CC: Keith Busch <keith.busch@intel.com>
      CC: Anthony Liguori <aliguori@amazon.com>
      CC: "Michael S. Tsirkin" <mst@redhat.com>
      CC: Paolo Bonzini <pbonzini@redhat.com>
      CC: Eric Blake <eblake@redhat.com>
      CC: Peter Maydell <peter.maydell@linaro.org>
      CC: Michael Tokarev <mjt@tls.msk.ru>
      CC: John Snow <jsnow@redhat.com>
      CC: Markus Armbruster <armbru@redhat.com>
      CC: Alexander Graf <agraf@suse.de>
      CC: Max Reitz <mreitz@redhat.com>
      Signed-off-by: NBenoît Canet <benoit.canet@nodalink.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      5366d0c8
    • B
      block: rename BlockAcctType members to start with BLOCK_ instead of BDRV_ · 28298fd3
      Benoît Canet 提交于
      The middle term goal is to move the BlockAcctStats structure in the device models.
      (Capturing I/O accounting statistics in the device models is good for billing)
      This patch make a small step in this direction by removing a reference to BDRV.
      
      CC: Kevin Wolf <kwolf@redhat.com>
      CC: Stefan Hajnoczi <stefanha@redhat.com>
      CC: Keith Busch <keith.busch@intel.com>
      CC: Anthony Liguori <aliguori@amazon.com>
      CC: "Michael S. Tsirkin" <mst@redhat.com>
      CC: Paolo Bonzini <pbonzini@redhat.com>
      CC: John Snow <jsnow@redhat.com>
      CC: Richard Henderson <rth@twiddle.net>
      CC: Markus Armbruster <armbru@redhat.com>
      CC: Alexander Graf <agraf@suse.de>i
      Signed-off-by: NBenoît Canet <benoit.canet@nodalink.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      28298fd3
  14. 26 8月, 2014 2 次提交
  15. 29 7月, 2014 2 次提交
  16. 23 6月, 2014 1 次提交
  17. 18 6月, 2014 3 次提交
  18. 16 6月, 2014 1 次提交
  19. 28 4月, 2014 2 次提交
  20. 22 2月, 2014 2 次提交
  21. 15 2月, 2014 1 次提交
  22. 25 1月, 2014 1 次提交
  23. 15 1月, 2014 1 次提交
  24. 22 12月, 2013 1 次提交
    • P
      scsi-disk: add UNMAP limits to block limits VPD page · 8a1bd297
      Paolo Bonzini 提交于
      Linux prefers WRITE SAME to UNMAP if the limits are zero, and WRITE
      SAME does not discard anything unless the device can guarantee that
      the resulting block is zero.
      
      Setting the maximum unmap block and descriptor counts to non-zero
      makes Linux choose UNMAP and fixes thin provisioning on glusterfs.
      
      While the maximum unmap block count can have some effect on performance,
      the (suggested) maximum number of descriptors is not particularly
      important so I didn't add a customization option.  SCSI drivers are
      used to online firmware updates so I'm not yet adding versioning support
      for SCSI, but we're probably getting close to the point when it's worth
      thinking about it.
      Reported-by: NBharata B Rao <bharata@linux.vnet.ibm.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      8a1bd297
  25. 09 12月, 2013 2 次提交