Index: new/qapi-schema.json
===================================================================
---- new.orig/qapi-schema.json 2013-12-06 07:46:40.000000000 +0100
-+++ new/qapi-schema.json 2013-12-06 07:46:45.000000000 +0100
+--- new.orig/qapi-schema.json 2013-12-06 10:26:47.000000000 +0100
++++ new/qapi-schema.json 2013-12-06 10:27:49.000000000 +0100
@@ -586,7 +586,7 @@
# @vma: Proxmox vma backup format
##
# @backup:
Index: new/blockdev.c
===================================================================
---- new.orig/blockdev.c 2013-12-06 07:46:40.000000000 +0100
-+++ new/blockdev.c 2013-12-06 08:09:32.000000000 +0100
-@@ -1463,6 +1463,8 @@
+--- new.orig/blockdev.c 2013-12-06 10:27:39.000000000 +0100
++++ new/blockdev.c 2013-12-06 10:27:49.000000000 +0100
+@@ -1760,6 +1760,8 @@
uint8_t dev_id;
//bool started;
bool completed;
} PVEBackupDevInfo;
static void pvebackup_run_next_job(void);
-@@ -1530,12 +1532,13 @@
+@@ -1828,8 +1830,6 @@
{
PVEBackupDevInfo *di = opaque;
- assert(backup_state.vmaw);
-
di->completed = true;
+
+ if (ret < 0 && !backup_state.error) {
+@@ -1840,8 +1840,11 @@
+ BlockDriverState *bs = di->bs;
+
di->bs = NULL;
+ di->target = NULL;
+ vma_writer_close_stream(backup_state.vmaw, di->dev_id);
+ }
- if (!backup_state.cancel) {
- pvebackup_run_next_job();
-@@ -1610,6 +1613,7 @@
+ block_job_cb(bs, ret);
+
+@@ -1918,6 +1921,7 @@
bool has_speed, int64_t speed, Error **errp)
{
BlockDriverState *bs;
Error *local_err = NULL;
uuid_t uuid;
VmaWriter *vmaw = NULL;
-@@ -1626,11 +1630,6 @@
+@@ -1934,11 +1938,6 @@
/* Todo: try to auto-detect format based on file name */
format = has_format ? format : BACKUP_FORMAT_VMA;
if (has_devlist) {
devs = g_strsplit_set(devlist, ",;:", -1);
-@@ -1698,27 +1697,63 @@
+@@ -2006,27 +2005,63 @@
uuid_generate(uuid);
}
/* add configuration file to archive */
-@@ -1731,12 +1766,27 @@
+@@ -2039,12 +2074,27 @@
goto err;
}
g_free(cdata);
}
-@@ -1776,10 +1826,11 @@
+@@ -2084,10 +2134,11 @@
PVEBackupDevInfo *di = (PVEBackupDevInfo *)l->data;
l = g_list_next(l);
if (local_err != NULL) {
error_setg(&backup_state.error, "backup_job_create failed");
pvebackup_cancel(NULL);
-@@ -1796,8 +1847,17 @@
+@@ -2104,8 +2155,17 @@
l = di_list;
while (l) {
}
g_list_free(di_list);
-@@ -1811,6 +1871,10 @@
+@@ -2119,6 +2179,10 @@
unlink(backup_file);
}
Index: new/hmp-commands.hx
===================================================================
---- new.orig/hmp-commands.hx 2013-12-06 07:46:38.000000000 +0100
-+++ new/hmp-commands.hx 2013-12-06 08:01:26.000000000 +0100
+--- new.orig/hmp-commands.hx 2013-12-06 10:26:47.000000000 +0100
++++ new/hmp-commands.hx 2013-12-06 10:27:49.000000000 +0100
@@ -85,9 +85,11 @@
{
Index: new/hmp.c
===================================================================
---- new.orig/hmp.c 2013-12-06 07:46:38.000000000 +0100
-+++ new/hmp.c 2013-12-06 07:50:58.000000000 +0100
+--- new.orig/hmp.c 2013-12-06 10:26:47.000000000 +0100
++++ new/hmp.c 2013-12-06 10:27:49.000000000 +0100
@@ -1245,11 +1245,13 @@
{
Error *error = NULL;