Bug 1336225 - qemu: some disk hotplug routines are missing drive_del on failure
Summary: qemu: some disk hotplug routines are missing drive_del on failure
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libvirt
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: John Ferlan
QA Contact:
URL:
Whiteboard: LibvirtFirstBug
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-05-15 21:29 UTC by Cole Robinson
Modified: 2016-08-02 18:26 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2016-08-02 18:26:03 UTC
Embargoed:


Attachments (Terms of Use)

Description Cole Robinson 2016-05-15 21:29:18 UTC
There's a could qemu hotplug implementations that are missing drive_del calls in their failure cleanup paths.

The good example to follow is 

1) src/qemu/qemu_hotplug.c: qemuDomainAttachSCSIDisk. It has a comment about missing drive_del, but drive_del has been around for a while. That comment and warning should be replaced with the logic from the failadddevice: label from qemuDomainAttachVirtioDiskDevice

2) src/qemu/qemu_hotplug.c: qemuDomainAttachUSBMassStorageDevice. The error pattern here should be updated to match what qemuDomainAttachVirtioDiskDevice does, which is a bit of a larger rework.

In fact, I think most of the disk hotplug code could be unified now to be shared between the three methods, since they all use the same monitor commands

Comment 1 John Ferlan 2016-08-02 16:08:58 UTC
Changes pushed upstream :

USB: commit id '190e22c06ba7e4b38e7690a7ef2ae4fc423a0b38'
SCSI: commit id '97ca6eed9a08d083cfc0428ddc30c2fb5ac2f3dd'

Comment 2 Peter Krempa 2016-08-02 18:26:03 UTC
Closing right now as it would probably be forgotten until next release.


Note You need to log in before you can comment on or make changes to this bug.