]> git.ipfire.org Git - thirdparty/libvirt.git/commit
hostdev: Detect untracked inactive devices
authorAndrea Bolognani <abologna@redhat.com>
Thu, 17 Mar 2016 16:41:31 +0000 (17:41 +0100)
committerAndrea Bolognani <abologna@redhat.com>
Wed, 23 Mar 2016 09:58:11 +0000 (10:58 +0100)
commitdf490e7c9b183b0a22cd0ed991b18640dad2696f
tree6f3d8a988cc098d3f4a51422ae899d7e88123c04
parent1e9a083742efe2a9d7a6db10bf55b1920fbb8226
hostdev: Detect untracked inactive devices

Unmanaged devices are attached to guests in two steps: first,
the device is detached from the host and marked as inactive;
subsequently, it is marked as active and attached to the guest.

If the daemon is restarted between these two operations, we lose
track of the inactive device.

Steps 5 and 6 of virHostdevPreparePCIDevices() already subtly
take care of this situation, but some planned changes will make
it so that's no longer the case. Plus, explicit is always better
than implicit.
src/util/virhostdev.c