All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] blktap2: blktap2 and pygrub (xen-unstable)
@ 2010-07-11 13:18 eXeC001er
  2010-07-11 13:57 ` Boris Derzhavets
  0 siblings, 1 reply; 2+ messages in thread
From: eXeC001er @ 2010-07-11 13:18 UTC (permalink / raw)
  To: Xen-devel


[-- Attachment #1.1: Type: text/plain, Size: 724 bytes --]

1. Bug fix for error: "Error: Device /dev/xvdp (51952, tap2) is already
connected."
2. Bug fix for error: "Error: Device 51952 not connected"


process of booting DomU with 'mounted-blktap2' (VHD for example) and
'pygrub' as bootloader:

1. Connect boot-device to Dom0 as '/dev/xpvd'
2. Pygrub get info for load DomU
3. Disconnect boot-device from Dom0
4. Boot DomU

During step 3 created device disconnecting from Dom0, but xenstore
does not scrape
away after device disconnected from Dom0 => result:
    "Error: Device /dev/xvdp (51952, tap2) is already connected."

During step 3 created device disconnecting from Dom0, but 'destroyDevice'
method is passed 'tap' always => result:
    "Error: Device 51952 not connected"

[-- Attachment #1.2: Type: text/html, Size: 1412 bytes --]

[-- Attachment #2: blkpat2_pygrub.patch --]
[-- Type: text/x-patch, Size: 1617 bytes --]

diff -r a672af698bc3 tools/python/xen/xend/XendDomainInfo.py
--- a/tools/python/xen/xend/XendDomainInfo.py	Fri Jul 09 12:35:58 2010 +0100
+++ b/tools/python/xen/xend/XendDomainInfo.py	Sun Jul 11 17:16:39 2010 +0400
@@ -3261,6 +3261,7 @@
 
             taptype = blkdev_uname_to_taptype(disk)
             mounted = devtype in ['tap', 'tap2'] and taptype != 'aio' and taptype != 'sync' and not os.stat(fn).st_rdev
+            mounted_vbd_uuid = 0
             if mounted:
                 # This is a file, not a device.  pygrub can cope with a
                 # file if it's raw, but if it's QCOW or other such formats
@@ -3276,7 +3277,8 @@
 
                 from xen.xend import XendDomain
                 dom0 = XendDomain.instance().privilegedDomain()
-                dom0._waitForDeviceUUID(dom0.create_vbd(vbd, disk))
+                mounted_vbd_uuid = dom0.create_vbd(vbd, disk);
+                dom0._waitForDeviceUUID(mounted_vbd_uuid)
                 fn = BOOTLOADER_LOOPBACK_DEVICE
 
             try:
@@ -3286,8 +3288,9 @@
                 if mounted:
                     log.info("Unmounting %s from %s." %
                              (fn, BOOTLOADER_LOOPBACK_DEVICE))
-
-                    dom0.destroyDevice('tap', BOOTLOADER_LOOPBACK_DEVICE)
+                    _, vbd_info = dom0.info['devices'][mounted_vbd_uuid]
+                    dom0.destroyDevice(dom0.getBlockDeviceClass(vbd_info['devid']), 
+                                       BOOTLOADER_LOOPBACK_DEVICE, force = True)
 
             if blcfg is None:
                 msg = "Had a bootloader specified, but can't find disk"

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] blktap2: blktap2 and pygrub (xen-unstable)
  2010-07-11 13:18 [PATCH] blktap2: blktap2 and pygrub (xen-unstable) eXeC001er
@ 2010-07-11 13:57 ` Boris Derzhavets
  0 siblings, 0 replies; 2+ messages in thread
From: Boris Derzhavets @ 2010-07-11 13:57 UTC (permalink / raw)
  To: Xen-devel, eXeC001er


[-- Attachment #1.1: Type: text/plain, Size: 1427 bytes --]

Yes , patches

-rw-r--r--  1 root root     1617 2010-07-11 17:28 blkpat2_pygrub.patch1
-rw-r--r--  1 root root      567 2010-07-11 17:44 blktap_incorrect_parse.patch1

resolve the problem.

Thanks.
Boris.

--- On Sun, 7/11/10, eXeC001er <execooler@gmail.com> wrote:

From: eXeC001er <execooler@gmail.com>
Subject: [Xen-devel] [PATCH] blktap2: blktap2 and pygrub (xen-unstable)
To: "Xen-devel" <xen-devel@lists.xensource.com>
Date: Sunday, July 11, 2010, 9:18 AM

1. Bug fix for error: "Error: Device /dev/xvdp (51952, tap2) is already connected."2. Bug fix for error: "Error: Device 51952 not connected" 

process of booting DomU with 'mounted-blktap2' (VHD for example) and 'pygrub' as bootloader:





1. Connect boot-device to Dom0 as '/dev/xpvd'2. Pygrub get info for load DomU3. Disconnect boot-device from Dom04. Boot DomU
During step 3 created device disconnecting from Dom0, but xenstore does not scrape away after device disconnected from Dom0 => result: 




    "Error: Device /dev/xvdp (51952, tap2) is already connected."





During step 3 created device disconnecting from Dom0, but 'destroyDevice' method is passed 'tap' always => result:    "Error: Device 51952 not connected"

-----Inline Attachment Follows-----

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel



      

[-- Attachment #1.2: Type: text/html, Size: 2670 bytes --]

[-- Attachment #2: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-07-11 13:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-11 13:18 [PATCH] blktap2: blktap2 and pygrub (xen-unstable) eXeC001er
2010-07-11 13:57 ` Boris Derzhavets

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.