WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-api

RE: [Xen-API] [PATCH] CA-50383: Don't write physical-device to hvm cdrom

To: Daniel Stodden <Daniel.Stodden@xxxxxxxxxx>, Xen-API <xen-api@xxxxxxxxxxxxxxxxxxx>
Subject: RE: [Xen-API] [PATCH] CA-50383: Don't write physical-device to hvm cdrom VBDs.
From: Dave Scott <Dave.Scott@xxxxxxxxxxxxx>
Date: Wed, 23 Feb 2011 11:50:19 +0000
Accept-language: en-US
Acceptlanguage: en-US
Cc: Jonathan Ludlam <Jonathan.Ludlam@xxxxxxxxxxxxx>
Delivery-date: Wed, 23 Feb 2011 03:50:34 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1298417186-10997-1-git-send-email-daniel.stodden@xxxxxxxxxx>
List-help: <mailto:xen-api-request@lists.xensource.com?subject=help>
List-id: Discussion of API issues surrounding Xen <xen-api.lists.xensource.com>
List-post: <mailto:xen-api@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-api>, <mailto:xen-api-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-api>, <mailto:xen-api-request@lists.xensource.com?subject=unsubscribe>
References: <1298417186-10997-1-git-send-email-daniel.stodden@xxxxxxxxxx>
Sender: xen-api-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcvS5/dxMj32pojqSTyaHVx9uXJoVAAZ9CyQ
Thread-topic: [Xen-API] [PATCH] CA-50383: Don't write physical-device to hvm cdrom VBDs.
Hi Daniel,

Thanks for this -- I've made a pull request for it:

https://github.com/xen-org/xen-api/pull/30

I'll merge it in shortly.

Cheers,
Dave

> -----Original Message-----
> From: xen-api-bounces@xxxxxxxxxxxxxxxxxxx [mailto:xen-api-
> bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of Daniel Stodden
> Sent: 22 February 2011 23:26
> To: Xen-API
> Cc: Jonathan Ludlam
> Subject: [Xen-API] [PATCH] CA-50383: Don't write physical-device to hvm
> cdrom VBDs.
> 
> To prevent blkback from pinning the device node. A Vbd.media_eject
> will only make qemu close it again and assume the node is in
> detachable state.
> 
> Signed-off-by: Daniel Stodden <daniel.stodden@xxxxxxxxxx>
> Cc: Jon Ludlam <jonathan.ludlam@xxxxxxxxxxxxx>
> ---
>  ocaml/xenops/device.ml |    6 ++++++
>  1 files changed, 6 insertions(+), 0 deletions(-)
> 
> diff --git a/ocaml/xenops/device.ml b/ocaml/xenops/device.ml
> index 734ef08..6ed4fc3 100644
> --- a/ocaml/xenops/device.ml
> +++ b/ocaml/xenops/device.ml
> @@ -527,6 +527,12 @@ let add ~xs ~hvm ~mode ~virtpath ~phystype
> ~physpath ~dev_type ~unpluggable
>       if protocol <> Protocol_Native then
>               Hashtbl.add front_tbl "protocol" (string_of_protocol
> protocol);
> 
> +     if hvm && dev_type = CDROM then
> +       (* CA-50383: Don't place physical-device in the HVM CDROM
> +          case, to prevent blkback from pinning the device node. A
> +          Vbd.media_eject will only make qemu close it again. *)
> +       Hashtbl.remove back_tbl "physical-device";
> +
>       let back = Hashtbl.to_list back_tbl in
>       let front = Hashtbl.to_list front_tbl in
> 
> --
> 1.7.0.4
> 
> 
> _______________________________________________
> xen-api mailing list
> xen-api@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/mailman/listinfo/xen-api

_______________________________________________
xen-api mailing list
xen-api@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/mailman/listinfo/xen-api

<Prev in Thread] Current Thread [Next in Thread>