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: [email protected] [mailto:xen-api-
> [email protected]] 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 <[email protected]>
> Cc: Jon Ludlam <[email protected]>
> ---
>  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
> [email protected]
> http://lists.xensource.com/mailman/listinfo/xen-api

_______________________________________________
xen-api mailing list
[email protected]
http://lists.xensource.com/mailman/listinfo/xen-api

Reply via email to