On 04/29/2011 04:46 AM, Eric Blake wrote: > On 04/28/2011 01:00 AM, Osier Yang wrote: >> 于 2011年04月27日 20:09, Yufang Zhang 写道: >>> Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=664059 >>> >>> This is the version3 patch for BZ#664059. > This sentence is not as useful in the commit message; it's handy in > reviews, but for someone using 'git am' to snarf the email message into > their own git tree, the way to convey that information is by putting it > after the '---' dividing line. That is, --- provides the boundary > between commit details and out-of-band review helps. > >>> Reattaching pci device back to >>> host without destroying guest or detaching device from guest would cause >>> host to crash. This patch adds a check before doing device reattach. If >>> the device is being assigned to guest, libvirt refuses to reattach device >>> to host. The patch only works for Xen, for it just checks xenstore to get >>> pci device information. This version fixes some formatting problem and moves >>> lock-unlock out of loop so that the check is atomic. >> We have same problem with qemu driver, though this patch looks fine >> and fix the problem for xen driver, IMHO it's not the ideal solution, >> ideally it will be nice if kernel could let us known if the device is >> still in use. I filed bug against kernel, no feedback yet though. > Link to that bug? > https://bugzilla.redhat.com/show_bug.cgi?id=667609 >>> Signed-off-by: Yufang Zhang<yuzhang@xxxxxxxxxx> >>> --- >>> src/xen/xen_driver.c | 67 ++++++++++++++++++++++++++++++++++++++++++++++++++ >>> 1 files changed, 67 insertions(+), 0 deletions(-) > ACK. > > I've added Yufang to AUTHORS (let me know off-list) if you prefer any > alternate spelling to your name and pushed this patch. > -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list