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

[Xen-API] [PATCH 1 of 1] [mq]: CA-10471-iso-to-aio.diff

To: Xen API <xen-api@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-API] [PATCH 1 of 1] [mq]: CA-10471-iso-to-aio.diff
From: Daniel Stodden <daniel.stodden@xxxxxxxxxx>
Date: Wed, 06 Oct 2010 02:18:05 -0000
Cc: jonathan.ludlam@xxxxxxxxxxxxx
Delivery-date: Tue, 05 Oct 2010 19:18:57 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <patchbomb.1286331484@xxxxxxxxxxxxxxxxxxxxxxx>
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: <patchbomb.1286331484@xxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-api-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mercurial-patchbomb/1.4.3
# HG changeset patch
# User Daniel Stodden <daniel.stodden@xxxxxxxxxx>
# Date 1286322863 25200
# Node ID 139a2e4d59d852a41518b7b264f5ee115f24f795
# Parent  e297f736579762983aec7d7072d72a3aa575825d
[mq]: CA-10471-iso-to-aio.diff

diff -r e297f7365797 -r 139a2e4d59d8 ocaml/xenops/device.ml
--- a/ocaml/xenops/device.ml    Tue Oct 05 16:44:26 2010 -0700
+++ b/ocaml/xenops/device.ml    Tue Oct 05 16:54:23 2010 -0700
@@ -475,8 +475,7 @@
        let request_path = backend_pause_request_path_of_device ~xs x in
        try ignore(xs.Xs.read request_path); true with Xb.Noent -> false
 
-(* Add the VBD to the domain, taking care of allocating any resources 
(specifically
-   loopback mounts). When this command returns, the device is ready. (This 
isn't as
+(* Add the VBD to the domain, When this command returns, the device is ready. 
(This isn't as
    concurrent as xend-- xend allocates loopdevices via hotplug in parallel and 
then
    performs a 'waitForDevices') *)
 let add ~xs ~hvm ~mode ~virtpath ~phystype ~physpath ~dev_type ~unpluggable
@@ -494,8 +493,7 @@
           1. qemu accesses devices images itself and so needs the path of the 
original
               file (in params)
            2. when windows PV drivers initialise, the new blockfront connects 
to the
-              up-til-now idle blockback and this requires the loop-device, in 
the file
-             case
+              up-til-now idle blockback.
            3. when the VM is fully PV, Ioemu devices do not work; all devices 
must be PV
           4. in the future an HVM guest might support a mixture of both
        *)
@@ -505,16 +503,6 @@
             List.iter (fun (k, v) -> Hashtbl.add back_tbl k v) keys
         | None -> ());
 
-       begin match phystype with
-         | File ->
-             if not(hvm) then begin
-               let loopdev = Hotplug.mount_loopdev ~xs device physpath (mode = 
ReadOnly) in
-               Hashtbl.add back_tbl "physical-device" (string_of_major_minor 
loopdev);
-               Hashtbl.add back_tbl "loop-device" loopdev
-             end
-         | Phys | Qcow | Vhd | Aio ->
-             Hashtbl.add back_tbl "physical-device" (string_of_major_minor 
physpath)
-          end;
 
        Hashtbl.add_list front_tbl [
                "backend-id", string_of_int backend_domid;
@@ -523,6 +511,7 @@
                "device-type", if dev_type = CDROM then "cdrom" else "disk";
        ];
        Hashtbl.add_list back_tbl [
+               "physical-device", (string_of_major_minor physpath);
                "frontend-id", sprintf "%u" domid;
                (* Prevents the backend hotplug scripts from running if the 
frontend disconnects.
                   This allows the xenbus connection to re-establish itself *)
 ocaml/xenops/device.ml |  17 +++--------------
 1 files changed, 3 insertions(+), 14 deletions(-)


# HG changeset patch
# User Daniel Stodden <daniel.stodden@xxxxxxxxxx>
# Date 1286322863 25200
# Node ID 139a2e4d59d852a41518b7b264f5ee115f24f795
# Parent  e297f736579762983aec7d7072d72a3aa575825d
[mq]: CA-10471-iso-to-aio.diff

diff -r e297f7365797 -r 139a2e4d59d8 ocaml/xenops/device.ml
--- a/ocaml/xenops/device.ml    Tue Oct 05 16:44:26 2010 -0700
+++ b/ocaml/xenops/device.ml    Tue Oct 05 16:54:23 2010 -0700
@@ -475,8 +475,7 @@
        let request_path = backend_pause_request_path_of_device ~xs x in
        try ignore(xs.Xs.read request_path); true with Xb.Noent -> false
 
-(* Add the VBD to the domain, taking care of allocating any resources 
(specifically
-   loopback mounts). When this command returns, the device is ready. (This 
isn't as
+(* Add the VBD to the domain, When this command returns, the device is ready. 
(This isn't as
    concurrent as xend-- xend allocates loopdevices via hotplug in parallel and 
then
    performs a 'waitForDevices') *)
 let add ~xs ~hvm ~mode ~virtpath ~phystype ~physpath ~dev_type ~unpluggable
@@ -494,8 +493,7 @@
           1. qemu accesses devices images itself and so needs the path of the 
original
               file (in params)
            2. when windows PV drivers initialise, the new blockfront connects 
to the
-              up-til-now idle blockback and this requires the loop-device, in 
the file
-             case
+              up-til-now idle blockback.
            3. when the VM is fully PV, Ioemu devices do not work; all devices 
must be PV
           4. in the future an HVM guest might support a mixture of both
        *)
@@ -505,16 +503,6 @@
             List.iter (fun (k, v) -> Hashtbl.add back_tbl k v) keys
         | None -> ());
 
-       begin match phystype with
-         | File ->
-             if not(hvm) then begin
-               let loopdev = Hotplug.mount_loopdev ~xs device physpath (mode = 
ReadOnly) in
-               Hashtbl.add back_tbl "physical-device" (string_of_major_minor 
loopdev);
-               Hashtbl.add back_tbl "loop-device" loopdev
-             end
-         | Phys | Qcow | Vhd | Aio ->
-             Hashtbl.add back_tbl "physical-device" (string_of_major_minor 
physpath)
-          end;
 
        Hashtbl.add_list front_tbl [
                "backend-id", string_of_int backend_domid;
@@ -523,6 +511,7 @@
                "device-type", if dev_type = CDROM then "cdrom" else "disk";
        ];
        Hashtbl.add_list back_tbl [
+               "physical-device", (string_of_major_minor physpath);
                "frontend-id", sprintf "%u" domid;
                (* Prevents the backend hotplug scripts from running if the 
frontend disconnects.
                   This allows the xenbus connection to re-establish itself *)
_______________________________________________
xen-api mailing list
xen-api@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/mailman/listinfo/xen-api