qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 0/3] Early release of -drive QemuOpts


From: Paolo Bonzini
Subject: [Qemu-devel] [PATCH 0/3] Early release of -drive QemuOpts
Date: Mon, 22 Feb 2016 15:39:02 +0100

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]