From: "Kasai Takanori" Subject: Re: [PATCH] Fix change of CDROM for block-configure command Date: Wed, 20 Jun 2007 13:34:58 +0900 Message-ID: <31b601c7b2f4$ac106b30$dab2220a@VF03007L> References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_31B3_01C7B33F.CBA6DB50" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Keir Fraser Cc: xen-devel List-Id: xen-devel@lists.xenproject.org This is a multi-part message in MIME format. ------=_NextPart_000_31B3_01C7B33F.CBA6DB50 Content-Type: text/plain; format=flowed; charset="iso-2022-jp"; reply-type=original Content-Transfer-Encoding: 7bit Hi Keir, Thank you for reply. > ioemu-nowait-change: This 5s timeout is deliberate. We consented that waiting was necessary for the Windows guest. > ioemu-nocheck-change: The strcmp is deliberate, to filter out redundant > firings of the xenstore watch. If you want to be able to e.g., ... We corrected the patch like writing an empty once character in xend. Signed-off-by: Takanori Kasai BTW, there is an acute problem in the change of CDROM. When physical device (/dev/cdrom) of CDROM is set first, CDROM of the second piece cannot be correctly read. It remains opening former device on backend even if it changes with block-configure. Therefore, CDROM of the second piece can read only the size of the first piece. linux-2.6.18-xen.hg/drivers/xen/blkback/xenbus.c 264 static void backend_changed(struct xenbus_watch *watch, 265 const char **vec, unsigned int len) ... 315 err = vbd_create(be->blkif, handle, major, minor, 316 (NULL == strchr(be->mode, 'w'))); How do you think that we should correct about this problem? Best Regards, -- Takanori Kasai ------=_NextPart_000_31B3_01C7B33F.CBA6DB50 Content-Type: application/octet-stream; name="python-blkif-change-cdrom.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="python-blkif-change-cdrom.patch" # HG changeset patch=0A= # User kasai.takanori@jp.fujitsu.com=0A= # Date 1182309779 -32400=0A= # Node ID d8431f7e8a3038ca9aa27a7dae614e4aa46974e3=0A= # Parent fb5077ecf9a440ab4fa128788172ce604c4b28f2=0A= Fix writing an empty character string to xenstore for block-configure.=0A= =0A= Signed-off-by: Takanori Kasai =0A= =0A= diff -r fb5077ecf9a4 -r d8431f7e8a30 = tools/python/xen/xend/server/blkif.py=0A= --- a/tools/python/xen/xend/server/blkif.py Tue Jun 19 18:07:53 2007 = +0100=0A= +++ b/tools/python/xen/xend/server/blkif.py Wed Jun 20 12:22:59 2007 = +0900=0A= @@ -98,6 +98,11 @@ class BlkifController(DevController):=0A= =0A= if (dev_type =3D=3D 'cdrom' and new_front['device-type'] =3D=3D = 'cdrom' and=0A= dev =3D=3D new_back['dev'] and mode =3D=3D 'r'):=0A= + # dummy device=0A= + self.writeBackend(devid,=0A= + 'type', new_back['type'],=0A= + 'params', '')=0A= + # new backend-device=0A= self.writeBackend(devid,=0A= 'type', new_back['type'],=0A= 'params', new_back['params'])=0A= ------=_NextPart_000_31B3_01C7B33F.CBA6DB50 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel ------=_NextPart_000_31B3_01C7B33F.CBA6DB50--