Jiri Denemark
2009-Mar-10 09:19 UTC
[Xen-devel] [PATCH] Test tap devices in testDeviceComplete()
Hi, XendDomainInfo.testDeviceComplete() should check block devices have shutdown correctly but it only considers vbd class devices and ignores tap devices. The attached patch changes testDeviceComplete() to wait for both vbd and tap devices to be shutdown correctly. Signed-off-by: Jiri Denemark <jdenemar@redhat.com> _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Christoph Egger
2009-Mar-10 09:31 UTC
Re: [Xen-devel] [PATCH] Test tap devices in testDeviceComplete()
On Tuesday 10 March 2009 10:19:23 Jiri Denemark wrote:> Hi, > > XendDomainInfo.testDeviceComplete() should check block devices have > shutdown correctly but it only considers vbd class devices and ignores tap > devices. The attached patch changes testDeviceComplete() to wait for both > vbd and tap devices to be shutdown correctly.Has this also been tested with PV guests ? In that case, there are no tap devices to shutdown. Christoph -- ---to satisfy European Law for business letters: Advanced Micro Devices GmbH Karl-Hammerschmidt-Str. 34, 85609 Dornach b. Muenchen Geschaeftsfuehrer: Jochen Polster, Thomas M. McCoy, Giuliano Meroni Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen Registergericht Muenchen, HRB Nr. 43632 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Jiri Denemark
2009-Mar-10 09:57 UTC
Re: [Xen-devel] [PATCH] Test tap devices in testDeviceComplete()
> > XendDomainInfo.testDeviceComplete() should check block devices have > > shutdown correctly but it only considers vbd class devices and ignores tap > > devices. The attached patch changes testDeviceComplete() to wait for both > > vbd and tap devices to be shutdown correctly. > > Has this also been tested with PV guests ? In that case, there are no tap > devices to shutdown.Hmm, testDeviceComplete() is called after _releaseDevices(), which destroys all devices. And even for a PV guest, I can see tap devices in /vm/UUID/device/tap tree in xenstore. vm = "" 0829a755-d2ed-607e-5847-ce9ec19e7422 = "" image = "(linux (kernel ) (videoram 4) (notes..." ostype = "linux" kernel = "/var/run/xend/boot/boot_kernel.QsXCO7" cmdline = "ro root=LABEL=/ selinux=0" ramdisk = "/var/run/xend/boot/boot_ramdisk.UzyMl2" device = "" tap = "" 51712 = "" frontend = "/local/domain/2/device/vbd/51712" frontend-id = "2" backend-id = "0" backend = "/local/domain/0/backend/tap/2/51712" That is, that device will be destroyed by _releaseDevices although not tested by testDeviceComplete to be completed. Anyway, this is a bit hard to test, as this code patch is only used when guest''s kernel lacks SUSPEND_CANCEL feature, which is present in current Xen kernels. While, I have a kernel without this feature, it also lacks some other parts and the guest crashes... On the other hand, I tested this on older Xen tools which match the kernel. This code path hasn''t really changed since than. Jirka -- Immorality: the morality of those who are having a better time. -- H. L. Mencken _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Keir Fraser
2009-Mar-10 10:01 UTC
Re: [Xen-devel] [PATCH] Test tap devices in testDeviceComplete()
On 10/03/2009 09:31, "Christoph Egger" <Christoph.Egger@amd.com> wrote:>> XendDomainInfo.testDeviceComplete() should check block devices have >> shutdown correctly but it only considers vbd class devices and ignores tap >> devices. The attached patch changes testDeviceComplete() to wait for both >> vbd and tap devices to be shutdown correctly. > > Has this also been tested with PV guests ? In that case, there are no tap > devices to shutdown.Tap vs vbd is orthogional to PV vs HVM. Either type of guest can use either type of storage backend. This detail is hidden from blkfront. -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel