All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/3] Early release of -drive QemuOpts
@ 2016-02-22 14:39 Paolo Bonzini
  2016-02-22 14:39 ` [Qemu-devel] [PATCH 1/3] block: detach devices from DriveInfo at unrealize time Paolo Bonzini
                   ` (4 more replies)
  0 siblings, 5 replies; 32+ messages in thread
From: Paolo Bonzini @ 2016-02-22 14:39 UTC (permalink / raw)
  To: qemu-devel; +Cc: Kevin Wolf, Markus Armbruster, Max Reitz

In short, this patch gets rid of blockdev_mark_auto_del and
blockdev_auto_del.

With these patches, it is possible to create a new -drive with the same
id as soon as the DEVICE_DELETED event is delivered (which equals to
unrealize).

I'm sorry I'm not able to explain the history (and probably do not
understand the full ramifications) of this.  That's why this is just
an RFC.

The idea here is that reference counting the BlockBackend is enough to
defer the deletion of the block device as much as necessary; anticipating
the destruction of the DriveInfo is not a problem, and has the desired
effect of freeing the QemuOpts.

Patches 1 and 3 are mostly similar to the version I had earlier sent as
RFC, but they now pass all unit tests.  Patch 2 is new, but I don't know
of a test that fails it.

Paolo

Paolo Bonzini (3):
  block: detach devices from DriveInfo at unrealize time
  block: keep BlockBackend alive until device finalize time
  block: remove legacy_dinfo at blk_detach_dev time

 block/block-backend.c            | 13 +++++++++----
 blockdev.c                       | 28 +++++++++-------------------
 hw/block/virtio-blk.c            |  4 +++-
 hw/block/xen_disk.c              |  1 +
 hw/core/qdev-properties-system.c | 13 +++++++++++--
 hw/ide/piix.c                    |  3 +++
 hw/scsi/scsi-bus.c               |  4 +++-
 hw/usb/dev-storage.c             |  3 ++-
 include/sysemu/blockdev.h        |  5 ++---
 9 files changed, 43 insertions(+), 31 deletions(-)

-- 
2.5.0

^ permalink raw reply	[flat|nested] 32+ messages in thread

end of thread, other threads:[~2016-03-23 12:13 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-22 14:39 [Qemu-devel] [PATCH 0/3] Early release of -drive QemuOpts Paolo Bonzini
2016-02-22 14:39 ` [Qemu-devel] [PATCH 1/3] block: detach devices from DriveInfo at unrealize time Paolo Bonzini
2016-03-21 15:13   ` Markus Armbruster
2016-03-21 15:31     ` Paolo Bonzini
2016-03-21 17:19       ` Markus Armbruster
2016-03-21 17:30         ` Paolo Bonzini
2016-03-23  8:35           ` Markus Armbruster
2016-03-23  9:35             ` Paolo Bonzini
2016-03-22 22:15         ` Paolo Bonzini
2016-02-22 14:39 ` [Qemu-devel] [PATCH 2/3] block: keep BlockBackend alive until device finalize time Paolo Bonzini
2016-03-21 15:22   ` Markus Armbruster
2016-03-21 15:37     ` Paolo Bonzini
2016-02-22 14:39 ` [Qemu-devel] [PATCH 3/3] block: remove legacy_dinfo at blk_detach_dev time Paolo Bonzini
2016-03-21 16:15   ` Markus Armbruster
2016-03-21 16:21     ` Paolo Bonzini
2016-03-21 17:30       ` Markus Armbruster
2016-03-21 17:34         ` Paolo Bonzini
2016-03-21 18:14           ` Markus Armbruster
2016-03-22  8:19             ` Kevin Wolf
2016-03-22 10:25               ` Markus Armbruster
2016-03-22 22:07                 ` Paolo Bonzini
2016-03-23  9:18                   ` Markus Armbruster
2016-03-23  9:40                     ` Paolo Bonzini
2016-03-23 12:13                       ` Markus Armbruster
2016-03-21 17:39         ` Kevin Wolf
2016-03-21 18:02           ` Markus Armbruster
2016-03-22 22:10           ` Paolo Bonzini
2016-03-23  8:37             ` Markus Armbruster
2016-03-09 12:20 ` [Qemu-devel] [PATCH 0/3] Early release of -drive QemuOpts Paolo Bonzini
2016-03-09 12:30   ` Kevin Wolf
2016-03-09 12:53     ` Markus Armbruster
2016-03-17 17:00 ` Markus Armbruster

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.