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
