]> git.proxmox.com Git - pve-qemu-kvm.git/commitdiff
update backup/blockdev patches
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Mon, 13 Jul 2015 13:27:55 +0000 (15:27 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Mon, 27 Jul 2015 08:26:45 +0000 (10:26 +0200)
debian/patches/backup-add-dir-format.patch
debian/patches/backup-add-pve-monitor-commands.patch
debian/patches/backup-modify-job-api.patch

index 3523a484c0073120c085a1a24ee19f824e7dcd30..648ef35ac1bb050cec17215fc6f4fdc7fccd7d35 100644 (file)
@@ -15,7 +15,7 @@ Index: new/blockdev.c
 ===================================================================
 --- new.orig/blockdev.c        2014-11-20 08:59:29.000000000 +0100
 +++ new/blockdev.c     2014-11-20 09:04:05.000000000 +0100
-@@ -1979,6 +1979,8 @@
+@@ -2301,6 +2301,8 @@
      uint8_t dev_id;
      //bool started;
      bool completed;
@@ -24,7 +24,7 @@ Index: new/blockdev.c
  } PVEBackupDevInfo;
  
  static void pvebackup_run_next_job(void);
-@@ -2047,8 +2049,6 @@
+@@ -2369,8 +2371,6 @@
  {
      PVEBackupDevInfo *di = opaque;
  
@@ -33,7 +33,7 @@ Index: new/blockdev.c
      di->completed = true;
  
      if (ret < 0 && !backup_state.error) {
-@@ -2059,8 +2059,11 @@
+@@ -2381,8 +2381,11 @@
      BlockDriverState *bs = di->bs;
  
      di->bs = NULL;
@@ -46,7 +46,7 @@ Index: new/blockdev.c
  
      block_job_cb(bs, ret);
  
-@@ -2138,6 +2141,7 @@
+@@ -2461,6 +2464,7 @@
  {
      BlockBackend *blk;
      BlockDriverState *bs = NULL;
@@ -54,7 +54,7 @@ Index: new/blockdev.c
      Error *local_err = NULL;
      uuid_t uuid;
      VmaWriter *vmaw = NULL;
-@@ -2154,11 +2158,6 @@
+@@ -2478,11 +2482,6 @@
      /* Todo: try to auto-detect format based on file name */
      format = has_format ? format : BACKUP_FORMAT_VMA;
  
@@ -66,7 +66,7 @@ Index: new/blockdev.c
      if (has_devlist) {
          devs = g_strsplit_set(devlist, ",;:", -1);
  
-@@ -2225,27 +2224,63 @@
+@@ -2551,27 +2550,63 @@
  
      uuid_generate(uuid);
  
@@ -146,7 +146,7 @@ Index: new/blockdev.c
      }
  
      /* add configuration file to archive */
-@@ -2258,12 +2293,27 @@
+@@ -2584,12 +2619,27 @@
              goto err;
          }
  
@@ -179,12 +179,12 @@ Index: new/blockdev.c
          g_free(cdata);
      }
  
-@@ -2303,10 +2353,11 @@
+@@ -2629,10 +2679,11 @@
          PVEBackupDevInfo *di = (PVEBackupDevInfo *)l->data;
          l = g_list_next(l);
  
--        backup_start(di->bs, NULL, speed, MIRROR_SYNC_MODE_FULL,
-+        backup_start(di->bs, di->target, speed, MIRROR_SYNC_MODE_FULL,
+-        backup_start(di->bs, NULL, speed, MIRROR_SYNC_MODE_FULL, NULL,
++        backup_start(di->bs, di->target, speed, MIRROR_SYNC_MODE_FULL, NULL,
                       BLOCKDEV_ON_ERROR_REPORT, BLOCKDEV_ON_ERROR_REPORT,
                       pvebackup_dump_cb, pvebackup_complete_cb, di,
                       true, &local_err);
@@ -192,7 +192,7 @@ Index: new/blockdev.c
          if (local_err != NULL) {
              error_setg(&backup_state.error, "backup_job_create failed");
              pvebackup_cancel(NULL);
-@@ -2323,8 +2374,17 @@
+@@ -2651,8 +2702,17 @@
  
      l = di_list;
      while (l) {
@@ -211,7 +211,7 @@ Index: new/blockdev.c
      }
      g_list_free(di_list);
  
-@@ -2338,6 +2398,10 @@
+@@ -2666,6 +2726,10 @@
          unlink(backup_file);
      }
  
@@ -226,7 +226,7 @@ Index: new/hmp-commands.hx
 ===================================================================
 --- new.orig/hmp-commands.hx   2014-11-20 08:59:29.000000000 +0100
 +++ new/hmp-commands.hx        2014-11-20 09:03:23.000000000 +0100
-@@ -90,9 +90,11 @@
+@@ -89,9 +89,11 @@
  
     {
          .name       = "backup",
@@ -245,7 +245,7 @@ Index: new/hmp.c
 ===================================================================
 --- new.orig/hmp.c     2014-11-20 08:59:29.000000000 +0100
 +++ new/hmp.c  2014-11-20 09:03:23.000000000 +0100
-@@ -1264,11 +1264,13 @@
+@@ -1459,11 +1459,13 @@
  {
      Error *error = NULL;
  
index c4dbf379ed9a5579378d7dea81bcc851d1fd0cb2..cdf1f540568afdf882815a34d30da1e83114e497 100644 (file)
@@ -2,7 +2,7 @@ Index: new/blockdev.c
 ===================================================================
 --- new.orig/blockdev.c        2014-11-20 07:36:12.000000000 +0100
 +++ new/blockdev.c     2014-11-20 07:47:31.000000000 +0100
-@@ -46,6 +46,7 @@
+@@ -49,6 +49,7 @@
  #include "qmp-commands.h"
  #include "trace.h"
  #include "sysemu/arch_init.h"
@@ -10,7 +10,7 @@ Index: new/blockdev.c
  
  static const char *const if_name[IF_COUNT] = {
      [IF_NONE] = "none",
-@@ -1954,6 +1955,440 @@
+@@ -2276,6 +2277,443 @@
      bdrv_put_ref_bh_schedule(bs);
  }
  
@@ -204,6 +204,7 @@ Index: new/blockdev.c
 +    gchar **devs = NULL;
 +    GList *di_list = NULL;
 +    GList *l;
++    UuidInfo *uuid_info;
 +
 +    if (backup_state.di_list) {
 +        error_set(errp, ERROR_CLASS_GENERIC_ERROR,
@@ -365,7 +366,7 @@ Index: new/blockdev.c
 +        PVEBackupDevInfo *di = (PVEBackupDevInfo *)l->data;
 +        l = g_list_next(l);
 +
-+        backup_start(di->bs, NULL, speed, MIRROR_SYNC_MODE_FULL,
++        backup_start(di->bs, NULL, speed, MIRROR_SYNC_MODE_FULL, NULL,
 +                     BLOCKDEV_ON_ERROR_REPORT, BLOCKDEV_ON_ERROR_REPORT,
 +                     pvebackup_dump_cb, pvebackup_complete_cb, di,
 +                     true, &local_err);
@@ -379,7 +380,9 @@ Index: new/blockdev.c
 +        pvebackup_run_next_job(); // run one job
 +    }
 +
-+    return g_strdup(backup_state.uuid_str);
++    uuid_info = g_malloc0(sizeof(*uuid_info));
++    uuid_info->UUID = g_strdup(backup_state.uuid_str);
++    return uuid_info;
 +
 +err:
 +
@@ -455,7 +458,7 @@ Index: new/hmp-commands.hx
 ===================================================================
 --- new.orig/hmp-commands.hx   2014-11-20 06:45:05.000000000 +0100
 +++ new/hmp-commands.hx        2014-11-20 07:47:31.000000000 +0100
-@@ -88,6 +88,35 @@
+@@ -87,6 +87,35 @@
  Copy data from a backing file into a block device.
  ETEXI
  
@@ -491,7 +494,7 @@ Index: new/hmp-commands.hx
      {
          .name       = "block_job_set_speed",
          .args_type  = "device:B,speed:o",
-@@ -1760,6 +1789,8 @@
+@@ -1768,6 +1797,8 @@
  show CPU statistics
  @item info usernet
  show user network stack connection states
@@ -504,7 +507,7 @@ Index: new/hmp.c
 ===================================================================
 --- new.orig/hmp.c     2014-11-20 07:26:23.000000000 +0100
 +++ new/hmp.c  2014-11-20 07:47:31.000000000 +0100
-@@ -137,6 +137,44 @@
+@@ -145,6 +145,44 @@
      qapi_free_MouseInfoList(mice_list);
  }
  
@@ -549,7 +552,7 @@ Index: new/hmp.c
  void hmp_info_migrate(Monitor *mon, const QDict *qdict)
  {
      MigrationInfo *info;
-@@ -1212,6 +1250,29 @@
+@@ -1407,6 +1445,29 @@
  
      hmp_handle_error(mon, &error);
  }
@@ -583,7 +586,7 @@ Index: new/hmp.h
 ===================================================================
 --- new.orig/hmp.h     2014-11-20 06:45:05.000000000 +0100
 +++ new/hmp.h  2014-11-20 07:47:31.000000000 +0100
-@@ -29,6 +29,7 @@
+@@ -30,6 +30,7 @@
  void hmp_info_migrate_capabilities(Monitor *mon, const QDict *qdict);
  void hmp_info_migrate_parameters(Monitor *mon, const QDict *qdict);
  void hmp_info_migrate_cache_size(Monitor *mon, const QDict *qdict);
@@ -591,7 +594,7 @@ Index: new/hmp.h
  void hmp_info_cpus(Monitor *mon, const QDict *qdict);
  void hmp_info_block(Monitor *mon, const QDict *qdict);
  void hmp_info_blockstats(Monitor *mon, const QDict *qdict);
-@@ -70,6 +71,8 @@
+@@ -74,6 +75,8 @@
  void hmp_change(Monitor *mon, const QDict *qdict);
  void hmp_block_set_io_throttle(Monitor *mon, const QDict *qdict);
  void hmp_block_stream(Monitor *mon, const QDict *qdict);
@@ -604,7 +607,7 @@ Index: new/monitor.c
 ===================================================================
 --- new.orig/monitor.c 2014-11-20 06:45:06.000000000 +0100
 +++ new/monitor.c      2014-11-20 07:47:31.000000000 +0100
-@@ -2848,6 +2848,13 @@
+@@ -2759,6 +2759,13 @@
      },
  #endif
      {
@@ -722,7 +725,7 @@ Index: new/qmp-commands.hx
 ===================================================================
 --- new.orig/qmp-commands.hx   2014-11-20 07:26:23.000000000 +0100
 +++ new/qmp-commands.hx        2014-11-20 07:47:31.000000000 +0100
-@@ -1097,6 +1097,24 @@
+@@ -1203,6 +1203,24 @@
  EQMP
  
      {
index b2ce47e68c68487a8639f75c5b7d7cd0d1d9c02d..62c9420d0c0d3f1543a28a29883149cfce1f55d0 100644 (file)
@@ -2,7 +2,7 @@ Index: new/block/backup.c
 ===================================================================
 --- new.orig/block/backup.c    2014-11-20 07:55:31.000000000 +0100
 +++ new/block/backup.c 2014-11-20 08:56:23.000000000 +0100
-@@ -39,6 +39,7 @@
+@@ -42,6 +42,7 @@
      BdrvDirtyBitmap *sync_bitmap;
      MirrorSyncMode sync_mode;
      RateLimit limit;
@@ -10,7 +10,7 @@ Index: new/block/backup.c
      BlockdevOnError on_source_error;
      BlockdevOnError on_target_error;
      CoRwlock flush_rwlock;
-@@ -136,14 +137,21 @@
+@@ -139,14 +140,21 @@
              goto out;
          }
  
@@ -38,7 +38,7 @@ Index: new/block/backup.c
          }
          if (ret < 0) {
              trace_backup_do_cow_write_fail(job, start, ret);
-@@ -205,7 +213,9 @@
+@@ -208,7 +216,9 @@
  {
      BackupBlockJob *s = container_of(job, BackupBlockJob, common);
  
@@ -49,7 +49,7 @@ Index: new/block/backup.c
  }
  
  static const BlockJobDriver backup_job_driver = {
-@@ -221,9 +231,11 @@
+@@ -224,9 +234,11 @@
      if (read) {
          return block_job_error_action(&job->common, job->common.bs,
                                        job->on_source_error, true, error);
@@ -62,7 +62,7 @@ Index: new/block/backup.c
      }
  }
  
-@@ -264,9 +276,11 @@
+@@ -351,9 +363,11 @@
  
      job->bitmap = hbitmap_alloc(end, 0);
  
@@ -77,7 +77,7 @@ Index: new/block/backup.c
  
      bdrv_add_before_write_notifier(bs, &before_write);
  
-@@ -359,8 +373,10 @@
+@@ -443,8 +461,10 @@
      }
      hbitmap_free(job->bitmap);
  
@@ -90,7 +90,7 @@ Index: new/block/backup.c
  
      data = g_malloc(sizeof(*data));
      data->ret = ret;
-@@ -370,13 +386,15 @@ for backup_start
+@@ -456,13 +472,15 @@ for backup_start
                    BdrvDirtyBitmap *sync_bitmap,
                    BlockdevOnError on_source_error,
                    BlockdevOnError on_target_error,
@@ -107,7 +107,7 @@ Index: new/block/backup.c
      assert(cb);
  
      if (bs == target) {
-@@ -419,7 +437,7 @@ in backup_start
+@@ -483,7 +501,7 @@ in backup_start
          return;
      }
  
@@ -116,7 +116,7 @@ Index: new/block/backup.c
          error_setg(errp, "Device is not inserted: %s",
                     bdrv_get_device_name(target));
          return;
-@@ -429,7 +447,7 @@ in backup_start
+@@ -493,7 +511,7 @@ in backup_start
          return;
      }
  
@@ -125,7 +125,7 @@ Index: new/block/backup.c
          return;
      }
  
-@@ -397,14 +415,17 @@ in backup_start
+@@ -529,14 +547,17 @@ in backup_start
          goto error;
      }
  
@@ -148,7 +148,7 @@ Index: new/blockdev.c
 ===================================================================
 --- new.orig/blockdev.c        2014-11-20 07:55:31.000000000 +0100
 +++ new/blockdev.c     2014-11-20 08:48:02.000000000 +0100
-@@ -2223,8 +2223,8 @@ qmp_drive_backup
+@@ -2571,8 +2571,8 @@ qmp_drive_backup
      }
  
      backup_start(bs, target_bs, speed, sync, bmap,
@@ -159,7 +159,7 @@ Index: new/blockdev.c
      if (local_err != NULL) {
          bdrv_unref(target_bs);
          error_propagate(errp, local_err);
-@@ -2284,7 +2284,7 @@ qmp_blockdev_backup
+@@ -2633,7 +2633,7 @@ qmp_blockdev_backup
      bdrv_ref(target_bs);
      bdrv_set_aio_context(target_bs, aio_context);
      backup_start(bs, target_bs, speed, sync, NULL, on_source_error,
@@ -172,7 +172,7 @@ Index: new/include/block/block_int.h
 ===================================================================
 --- new.orig/include/block/block_int.h 2014-11-20 07:55:31.000000000 +0100
 +++ new/include/block/block_int.h      2014-11-20 08:52:59.000000000 +0100
-@@ -57,6 +57,9 @@
+@@ -59,6 +59,9 @@
  
  #define BLOCK_PROBE_BUF_SIZE        512
  
@@ -182,7 +182,7 @@ Index: new/include/block/block_int.h
  typedef struct BdrvTrackedRequest {
      BlockDriverState *bs;
      int64_t offset;
-@@ -583,7 +586,9 @@
+@@ -651,7 +654,9 @@
                    BdrvDirtyBitmap *sync_bitmap,
                    BlockdevOnError on_source_error,
                    BlockdevOnError on_target_error,