[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH 2/2] remus: support disk replicated checkpointing



Signed-off-by: Lai Jiangshan <laijs@xxxxxxxxxxxxxx>
Signed-off-by: Wen Congyang <wency@xxxxxxxxxxxxxx>
---
 tools/libxl/libxl_remus_device.c |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/tools/libxl/libxl_remus_device.c b/tools/libxl/libxl_remus_device.c
index c323773..316f832 100644
--- a/tools/libxl/libxl_remus_device.c
+++ b/tools/libxl/libxl_remus_device.c
@@ -123,6 +123,13 @@ static void libxl__remus_teardown_cleanup(libxl__egc *egc,
     dev_state->nics = NULL;
     dev_state->num_nics = 0;
 
+    /* clean disk */
+    for (i = 0; i < dev_state->num_disks; i++)
+        libxl_device_disk_dispose(&dev_state->disks[i]);
+    free(dev_state->disks);
+    dev_state->disks = NULL;
+    dev_state->num_disks = 0;
+
     /* clean device_types */
     for (i = 0; i < ARRAY_SIZE(device_types); i++) {
         dev_type = device_types[i];
@@ -352,7 +359,9 @@ void libxl__remus_device_setup(libxl__egc *egc,
         dev_state->num_devices += num_devices;
     }
 
-    /* TBD: enable disk buffering */
+    dev_state->disks = libxl_device_disk_list(CTX, dss->domid, &num_devices);
+    dev_state->num_disks = num_devices;
+    dev_state->num_devices += num_devices;
 
     GCNEW_ARRAY(dev_state->dev, dev_state->num_devices);
 
-- 
1.7.4.4


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.