Re: [libvirt] [PATCH 0/2] Adjust order of calls during qemuDomainRemoveHostDevice

2016-04-04 Thread Laine Stump

On 03/28/2016 05:17 PM, Laine Stump wrote:

On 03/28/2016 07:52 AM, John Ferlan wrote:

While reviewing patch:

http://www.redhat.com/archives/libvir-list/2016-March/msg00194.html

I noted that the order of operations during the code path was slightly
different and could cause issues if the reattachment code was called
first. It would seem that resetting the hostdev label and cgroup prior
to reattaching the device to the host would be a better corollary to
the attachment code path which detaches the devices from the host, then
sets the cgroup, then sets the hostdev label.


I've noticed similar issues at other places in the code (teardown not 
being the exact mirror image of setup) but didn't touch it because I 
didn't want to accidentally introduce regressions.


I wanted to test these patches to verify that the sequence change 
doesn't uncover some odd regression, but now I find that hotplug of 
type='hostdev' network devices is completely broken (even before 
applying your patches), so I'll have to figure out the cause of that 
first :-/



I was finally able to try this out (extensively, because I've been 
testing the fixes for the other problems I found on top of your 
patches). Everything checks out and the logic makes sense, so ACK.


--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


Re: [libvirt] [PATCH 0/2] Adjust order of calls during qemuDomainRemoveHostDevice

2016-03-28 Thread Laine Stump

On 03/28/2016 07:52 AM, John Ferlan wrote:

While reviewing patch:

http://www.redhat.com/archives/libvir-list/2016-March/msg00194.html

I noted that the order of operations during the code path was slightly
different and could cause issues if the reattachment code was called
first. It would seem that resetting the hostdev label and cgroup prior
to reattaching the device to the host would be a better corollary to
the attachment code path which detaches the devices from the host, then
sets the cgroup, then sets the hostdev label.


I've noticed similar issues at other places in the code (teardown not 
being the exact mirror image of setup) but didn't touch it because I 
didn't want to accidentally introduce regressions.


I wanted to test these patches to verify that the sequence change 
doesn't uncover some odd regression, but now I find that hotplug of 
type='hostdev' network devices is completely broken (even before 
applying your patches), so I'll have to figure out the cause of that 
first :-/


--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


[libvirt] [PATCH 0/2] Adjust order of calls during qemuDomainRemoveHostDevice

2016-03-28 Thread John Ferlan
While reviewing patch:

http://www.redhat.com/archives/libvir-list/2016-March/msg00194.html

I noted that the order of operations during the code path was slightly
different and could cause issues if the reattachment code was called
first. It would seem that resetting the hostdev label and cgroup prior
to reattaching the device to the host would be a better corollary to
the attachment code path which detaches the devices from the host, then
sets the cgroup, then sets the hostdev label.

John Ferlan (2):
  qemu: Restore label before reattach device to host
  qemu: Tear down the cgroup before reattach device to host

 src/qemu/qemu_hotplug.c | 24 +++-
 1 file changed, 11 insertions(+), 13 deletions(-)

-- 
2.5.5

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list