]> git.proxmox.com Git - pve-qemu-kvm.git/blobdiff - debian/patches/backup-add-dir-format.patch
always set backup end time to mark backup as finished
[pve-qemu-kvm.git] / debian / patches / backup-add-dir-format.patch
index 9663f5009b8632705ea41e0691ad69d6f029dc30..2a92799b2b09aec75369926d36928f1ac549ec41 100644 (file)
@@ -1,7 +1,7 @@
 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
  ##
@@ -13,9 +13,9 @@ Index: new/qapi-schema.json
  # @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;
@@ -24,13 +24,18 @@ Index: new/blockdev.c
  } 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;
  
@@ -39,9 +44,9 @@ Index: new/blockdev.c
 +        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;
@@ -49,7 +54,7 @@ Index: new/blockdev.c
      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;
  
@@ -61,7 +66,7 @@ Index: new/blockdev.c
      if (has_devlist) {
          devs = g_strsplit_set(devlist, ",;:", -1);
  
-@@ -1698,27 +1697,63 @@
+@@ -2006,27 +2005,63 @@
  
      uuid_generate(uuid);
  
@@ -141,7 +146,7 @@ Index: new/blockdev.c
      }
  
      /* add configuration file to archive */
-@@ -1731,12 +1766,27 @@
+@@ -2039,12 +2074,27 @@
              goto err;
          }
  
@@ -174,7 +179,7 @@ Index: new/blockdev.c
          g_free(cdata);
      }
  
-@@ -1776,10 +1826,11 @@
+@@ -2084,10 +2134,11 @@
          PVEBackupDevInfo *di = (PVEBackupDevInfo *)l->data;
          l = g_list_next(l);
  
@@ -187,7 +192,7 @@ Index: new/blockdev.c
          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) {
@@ -206,7 +211,7 @@ Index: new/blockdev.c
      }
      g_list_free(di_list);
  
-@@ -1811,6 +1871,10 @@
+@@ -2119,6 +2179,10 @@
          unlink(backup_file);
      }
  
@@ -219,8 +224,8 @@ Index: new/blockdev.c
  
 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 @@
  
     {
@@ -238,8 +243,8 @@ Index: new/hmp-commands.hx
  
 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;