1. 02 8月, 2011 3 次提交
  2. 01 8月, 2011 4 次提交
  3. 19 7月, 2011 1 次提交
  4. 08 6月, 2011 2 次提交
  5. 19 5月, 2011 2 次提交
    • M
      block: Remove type hint, it's guest matter, doesn't belong here · 8d278467
      Markus Armbruster 提交于
      No users of bdrv_get_type_hint() left.  bdrv_set_type_hint() can make
      the media removable by side effect.  Make that explicit.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      8d278467
    • M
      block QMP: Deprecate query-block's "type", drop info block's "type=" · d8aeeb31
      Markus Armbruster 提交于
      query-block's specification documents response member "type" with
      values "hd", "cdrom", "floppy", "unknown".
      
      Its value is unreliable: a block device used as floppy has type
      "floppy" if created with if=floppy, but type "hd" if created with
      if=none.
      
      That's because with if=none, the type is at best a declaration of
      intent: the drive can be connected to any guest device.  Its type is
      really the guest device's business.  Reporting it here is wrong.
      
      No known user of QMP uses "type".  It's unlikely that any unknown
      users exist, because its value is useless unless you know how the
      block device was created.  But then you also know the true value.
      
      Fixing the broken value risks breaking (hypothetical!) clients that
      somehow rely on the current behavior.  Not fixing the value risks
      breaking (hypothetical!) clients that rely on the value to be
      accurate.  Can't entirely avoid hypothetical lossage.  Change the
      value to be always "unknown".
      
      This makes "info block" always report "type=unknown".  Pointless.
      Change it to not report the type.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      d8aeeb31
  6. 08 5月, 2011 1 次提交
  7. 06 5月, 2011 1 次提交
  8. 07 4月, 2011 3 次提交
    • S
      block: Do not cache device size for removable media · 46a4e4e6
      Stefan Hajnoczi 提交于
      The block layer caches the device size to avoid doing lseek(fd, 0,
      SEEK_END) every time this value is needed.  For removable media the
      device size becomes stale if a new medium is inserted.  This patch
      simply prevents device size caching for removable media.
      
      A smarter solution is to update the cached device size when a new medium
      is inserted.  Given that there are currently bugs with CD-ROM media
      change I do not want to implement that approach until we've gotten
      things correct first.
      Signed-off-by: NStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      46a4e4e6
    • S
      trace: Trace bdrv_set_locked() · b8c6d095
      Stefan Hajnoczi 提交于
      It can be handy to know when the guest locks/unlocks the CD-ROM tray.
      This trace event makes that possible.
      Signed-off-by: NStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      b8c6d095
    • R
      Do not delete BlockDriverState when deleting the drive · d22b2f41
      Ryan Harper 提交于
      When removing a drive from the host-side via drive_del we currently have
      the following path:
      
      drive_del
      qemu_aio_flush()
      bdrv_close()    // zaps bs->drv, which makes any subsequent I/O get
                      // dropped.  Works as designed
      drive_uninit()
      bdrv_delete()   // frees the bs.  Since the device is still connected to
                      // bs, any subsequent I/O is a use-after-free.
      
      The value of bs->drv becomes unpredictable on free.  As long as it
      remains null, I/O still gets dropped, however it could become non-null
      at any point after the free resulting SEGVs or other QEMU state
      corruption.
      
      To resolve this issue as simply as possible, we can chose to not
      actually delete the BlockDriverState pointer.  Since bdrv_close()
      handles setting the drv pointer to NULL, we just need to remove the
      BlockDriverState from the QLIST that is used to enumerate the block
      devices.  This is currently handled within bdrv_delete, so move this
      into its own function, bdrv_make_anon().
      
      The result is that we can now invoke drive_del, this closes the file
      descriptors and sets BlockDriverState->drv to NULL which prevents futher
      IO to the device, and since we do not free BlockDriverState, we don't
      have to worry about the copy retained in the block devices.
      
      We also don't attempt to remove the qdev property since we are no longer
      deleting the BlockDriverState on drives with associated drives.  This
      also allows for removing Drives with no devices associated either.
      Reported-by: NMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: NRyan Harper <ryanh@us.ibm.com>
      Acked-by: NMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      d22b2f41
  9. 15 3月, 2011 1 次提交
  10. 07 3月, 2011 1 次提交
  11. 20 2月, 2011 1 次提交
  12. 07 2月, 2011 2 次提交
  13. 31 1月, 2011 1 次提交
  14. 24 1月, 2011 1 次提交
  15. 07 1月, 2011 1 次提交
  16. 17 12月, 2010 6 次提交
  17. 14 12月, 2010 1 次提交
  18. 21 11月, 2010 2 次提交
  19. 04 11月, 2010 1 次提交
  20. 22 10月, 2010 1 次提交
    • E
      Copy snapshots out of QCOW2 disk · 51ef6727
      edison 提交于
      In order to backup snapshots, created from QCOW2 iamge, we want to copy snapshots out of QCOW2 disk to a seperate storage.
      The following patch adds a new option in "qemu-img": qemu-img convert -f qcow2 -O qcow2 -s snapshot_name src_img bck_img.
      Right now, it only supports to copy the full snapshot, delta snapshot is on the way.
      
      Changes from V1: all the comments from Kevin are addressed:
      Add read-only checking
      Fix coding style
      Change the name from bdrv_snapshot_load to bdrv_snapshot_load_tmp
      Signed-off-by: NDisheng Su <edison@cloud.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      51ef6727
  21. 09 10月, 2010 1 次提交
  22. 10 9月, 2010 1 次提交
  23. 09 9月, 2010 1 次提交
  24. 31 8月, 2010 1 次提交