Fix to Allow blktap to be able to be booted as system volume for PV-on-HVM.
PATCH 1/1 Fix to Allow blktap to be able to be booted as system volume for PV-on-HVM.
Hi All,
I sent the patch to allow blktap to be able to booted as system bolume for PV-on-HVM. However, there was a problem that hdN and xvdN were not able to be specified at the same time.
I made the patch to correct it as follows.
- Whether hdN is defined first is checked.
- If hdN is defined, xvdN is not replaced with hdN.
Best Regards,
--
Takanori Kasai
----- Original Message ----- From: "Kasai Takanori" <[email protected]>
To: "You, Yongkang" <[email protected]>; "xen-devel" <[email protected]>
Sent: Tuesday, October 16, 2007 1:38 PM
Subject: Re: [Xen-devel] [PATCH] [IOEMU] Allow blktap to be able to be booted as system volume for PV-on-HVM(TAKE 3)
Quoted 19 lines
Hi Yongkang,
Thank you for reply.
There is a problem when hdN and xvdN are specified at the same time. Because the patch has already been applied, the hot fix is sent by the addition.
It corrects as follows.
- Whether hdN is defined first is checked.
- If hdN is defined, xvdN is not replaced with hdN.I will make the hot fix of the addition and contribute to the community.
Best Regards,
--
Takanori Kasai
Quoted 48 lines
----- Original Message -----
From: "You, Yongkang" <[email protected]>
To: "Kasai Takanori" <[email protected]>; "xen-devel" <[email protected]>
Sent: Tuesday, October 16, 2007 12:05 PM
Subject: RE: [Xen-devel] [PATCH] [IOEMU] Allow blktap to be able to be booted assystemvolume for PV-on-HVM(TAKE 3)Quoted 39 lines
Hi Kasai,
It seems there is a bug caused by this patch.
If providing both hda and xvda, there would be two hda devices given to Qemu. And the image of xvda would be recover the real hda. If xvda doesn't include booting system, HVM booting failed. So how about have a little modify? If there is a hdx device, don't translate xvdx to related hdx.Best Regards,
Yongkang YouQuoted 27 lines
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Kasai Takanori
Sent: Monday, October 15, 2007 6:43 PM
To: xen-devel
Subject: [Xen-devel] [PATCH] [IOEMU] Allow blktap to be able to be booted assystemvolume for PV-on-HVM(TAKE 3)Hi All,
I sent the patch to make blktap work with PV-on-HVM.
I corrected the part that had been pointed out in the Xen community.・All xvdN disk is looked like hdN.
・All tap disks are checked.(tap:aio, tap:sync, tap:vmdk, etc.)We cannot use blktap for the volume of the system with PV-on-HVM and are embarrassed.
Could you apply this patch? Or, please give the comment to me.Signed-off-by Takanori Kasai <[email protected]>Best Regards,
--
Takanori Kasai
# HG changeset patch
# User [email protected]
# Date 1192519539 -32400
# Node ID 3c958d2223181164b4ab6da4216ca5f610aa0fe9
# Parent 2372f89c0447e055506489688f53c9c69b6080d9
Fix to allow blktap to be able to be booted as system volume for PV-on-HVM.
- Whether hdN is defined first is checked.
- If hdN is defined, xvdN is not replaced with hdN.
tools/ioemu/xenstore.c +23 -2
@@ -83,7 +83,7 @@ void xenstore_parse_domain_config(int dochar *buf =NULL , *path;char *fpath =NULL , *bpath =NULL , *dev =NULL , *params =NULL , *type =NULL , *drv =NULL ; -int i, is_scsi; +int i, is_scsi, is_hdN =0 ;unsigned int len, num, hd_index;for (i =0 ; i <MAX_DISKS +MAX_SCSI_DISKS ; i++)
@@ -123,8 +123,29 @@ void xenstore_parse_domain_config(int do dev =xs_read (xsh,XBT_NULL , buf, &len);if (dev ==NULL )continue ; +if (!strncmp (dev,"hd" ,2 )) { + is_hdN =1 ; +break ; + } + } + +for (i =0 ; i < num; i++) { +/* read the backend path */ +if (pasprintf (&buf,"%s/device/vbd/%s/backend" , path, e[i]) ==-1 ) +continue ; +free (bpath); + bpath =xs_read (xsh,XBT_NULL , buf, &len); +if (bpath ==NULL ) +continue ; +/* read the name of the device */ +if (pasprintf (&buf,"%s/dev" , bpath) ==-1 ) +continue ; +free (dev); + dev =xs_read (xsh,XBT_NULL , buf, &len); +if (dev ==NULL ) +continue ;/* Change xvdN to look like hdN */ -if (!strncmp (dev,"xvd" ,3 )) { +if ( !is_hdN && !strncmp (dev,"xvd" ,3 )) {fprintf (logfile,"Change xvd%c to look like hd%c\n" , dev[3 ], dev[3 ]);memmove (dev, dev+1 ,strlen (dev));
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel