Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 952106 Details for
Bug 1158886
virDomainDetachDeviceFlags() does not support VIR_DOMAIN_DEVICE_MODIFY_FORCE
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
make virDomainDetachDeviceFlags() honor VIR_DOMAIN_DEVICE_MODIFY_FORCE
force-remove.patch (text/plain), 4.96 KB, created by
m.gibula
on 2014-10-30 12:49:54 UTC
(
hide
)
Description:
make virDomainDetachDeviceFlags() honor VIR_DOMAIN_DEVICE_MODIFY_FORCE
Filename:
MIME Type:
Creator:
m.gibula
Created:
2014-10-30 12:49:54 UTC
Size:
4.96 KB
patch
obsolete
>diff -ru libvirt-1.2.6-orig/src/qemu/qemu_driver.c libvirt-1.2.6/src/qemu/qemu_driver.c >--- libvirt-1.2.6-orig/src/qemu/qemu_driver.c 2014-07-02 05:35:47.000000000 +0200 >+++ libvirt-1.2.6/src/qemu/qemu_driver.c 2014-10-09 13:37:27.863897583 +0200 >@@ -6525,14 +6525,15 @@ > static int > qemuDomainDetachDeviceLive(virDomainObjPtr vm, > virDomainDeviceDefPtr dev, >- virDomainPtr dom) >+ virDomainPtr dom, >+ int flags) > { > virQEMUDriverPtr driver = dom->conn->privateData; > int ret = -1; > > switch (dev->type) { > case VIR_DOMAIN_DEVICE_DISK: >- ret = qemuDomainDetachDeviceDiskLive(driver, vm, dev); >+ ret = qemuDomainDetachDeviceDiskLive(driver, vm, dev, flags); > break; > case VIR_DOMAIN_DEVICE_CONTROLLER: > ret = qemuDomainDetachDeviceControllerLive(driver, vm, dev); >@@ -7257,7 +7258,8 @@ > virCapsPtr caps = NULL; > > virCheckFlags(VIR_DOMAIN_AFFECT_LIVE | >- VIR_DOMAIN_AFFECT_CONFIG, -1); >+ VIR_DOMAIN_AFFECT_CONFIG | >+ VIR_DOMAIN_DEVICE_MODIFY_FORCE, -1); > > cfg = virQEMUDriverGetConfig(driver); > >@@ -7343,7 +7345,7 @@ > VIR_DOMAIN_DEVICE_ACTION_DETACH) < 0) > goto endjob; > >- if ((ret = qemuDomainDetachDeviceLive(vm, dev_copy, dom)) < 0) >+ if ((ret = qemuDomainDetachDeviceLive(vm, dev_copy, dom, flags)) < 0) > goto endjob; > /* > * update domain status forcibly because the domain status may be >diff -ru libvirt-1.2.6-orig/src/qemu/qemu_hotplug.c libvirt-1.2.6/src/qemu/qemu_hotplug.c >--- libvirt-1.2.6-orig/src/qemu/qemu_hotplug.c 2014-06-27 05:50:18.000000000 +0200 >+++ libvirt-1.2.6/src/qemu/qemu_hotplug.c 2014-10-09 13:35:55.566375716 +0200 >@@ -2906,7 +2906,8 @@ > static int > qemuDomainDetachVirtioDiskDevice(virQEMUDriverPtr driver, > virDomainObjPtr vm, >- virDomainDiskDefPtr detach) >+ virDomainDiskDefPtr detach, >+ int flags) > { > int ret = -1; > qemuDomainObjPrivatePtr priv = vm->privateData; >@@ -2958,7 +2959,7 @@ > qemuDomainObjExitMonitor(driver, vm); > > rc = qemuDomainWaitForDeviceRemoval(vm); >- if (rc == 0 || rc == 1) >+ if (rc == 0 || rc == 1 || (flags & VIR_DOMAIN_DEVICE_MODIFY_FORCE)) > ret = qemuDomainRemoveDiskDevice(driver, vm, detach); > else > ret = 0; >@@ -2971,7 +2972,8 @@ > static int > qemuDomainDetachDiskDevice(virQEMUDriverPtr driver, > virDomainObjPtr vm, >- virDomainDiskDefPtr detach) >+ virDomainDiskDefPtr detach, >+ int flags) > { > int ret = -1; > qemuDomainObjPrivatePtr priv = vm->privateData; >@@ -3003,7 +3005,7 @@ > qemuDomainObjExitMonitor(driver, vm); > > rc = qemuDomainWaitForDeviceRemoval(vm); >- if (rc == 0 || rc == 1) >+ if (rc == 0 || rc == 1 || (flags & VIR_DOMAIN_DEVICE_MODIFY_FORCE)) > ret = qemuDomainRemoveDiskDevice(driver, vm, detach); > else > ret = 0; >@@ -3030,7 +3032,8 @@ > int > qemuDomainDetachDeviceDiskLive(virQEMUDriverPtr driver, > virDomainObjPtr vm, >- virDomainDeviceDefPtr dev) >+ virDomainDeviceDefPtr dev, >+ int flags) > { > virDomainDiskDefPtr disk; > int ret = -1; >@@ -3047,10 +3050,10 @@ > case VIR_DOMAIN_DISK_DEVICE_DISK: > case VIR_DOMAIN_DISK_DEVICE_LUN: > if (disk->bus == VIR_DOMAIN_DISK_BUS_VIRTIO) >- ret = qemuDomainDetachVirtioDiskDevice(driver, vm, disk); >+ ret = qemuDomainDetachVirtioDiskDevice(driver, vm, disk, flags); > else if (disk->bus == VIR_DOMAIN_DISK_BUS_SCSI || > disk->bus == VIR_DOMAIN_DISK_BUS_USB) >- ret = qemuDomainDetachDiskDevice(driver, vm, disk); >+ ret = qemuDomainDetachDiskDevice(driver, vm, disk, flags); > else > virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s", > _("This type of disk cannot be hot unplugged")); >diff -ru libvirt-1.2.6-orig/src/qemu/qemu_hotplug.h libvirt-1.2.6/src/qemu/qemu_hotplug.h >--- libvirt-1.2.6-orig/src/qemu/qemu_hotplug.h 2014-06-25 13:25:52.000000000 +0200 >+++ libvirt-1.2.6/src/qemu/qemu_hotplug.h 2014-10-09 13:36:22.255659117 +0200 >@@ -71,7 +71,8 @@ > int linkstate); > int qemuDomainDetachDeviceDiskLive(virQEMUDriverPtr driver, > virDomainObjPtr vm, >- virDomainDeviceDefPtr dev); >+ virDomainDeviceDefPtr dev, >+ int flags); > int qemuDomainDetachControllerDevice(virQEMUDriverPtr driver, > virDomainObjPtr vm, > virDomainDeviceDefPtr dev); >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1158886
: 952106