[pve-devel] [PATCH kvm 2/4] rebase patches onto 2.6.1

Wolfgang Bumiller w.bumiller at proxmox.com
Mon Aug 22 13:24:35 CEST 2016


---
 .../pve/0001-fr-ca-keymap-corrections.patch        |   4 +-
 ...002-Adjust-network-script-path-to-etc-kvm.patch |   6 +-
 debian/patches/pve/0003-vnc-altgr-emulation.patch  |  12 +-
 ...-return-success-on-info-without-snapshots.patch |   8 +-
 debian/patches/pve/0005-use-kvm-by-default.patch   |   8 +-
 .../pve/0006-virtio-balloon-fix-query.patch        |  22 +-
 ...PU-model-to-kvm64-32-instead-of-qemu64-32.patch |   8 +-
 .../pve/0008-qapi-modify-query-machines.patch      |  14 +-
 .../patches/pve/0009-qapi-modify-spice-query.patch |  12 +-
 ...fault-to-pve-certs-unless-otherwise-speci.patch |   8 +-
 .../0011-introduce-new-vma-archive-format.patch    |  12 +-
 .../patches/pve/0012-vma-add-verify-command.patch  |   4 +-
 ...vma-add-config-command-to-dump-the-config.patch |   4 +-
 ...store-tolerate-a-size-difference-up-to-4M.patch |   4 +-
 .../patches/pve/0015-backup-modify-job-api.patch   |  30 +--
 .../pve/0016-backup-add-pve-monitor-commands.patch |  28 +--
 .../pve/0017-backup-vma-add-dir-format.patch       |  36 +--
 ...kup-do-not-return-errors-in-dump-callback.patch |  14 +-
 ...0019-backup-vma-correctly-propagate-error.patch |   8 +-
 .../pve/0020-backup-vma-remove-async-queue.patch   |  10 +-
 ...021-backup-vma-run-flush-inside-coroutine.patch |  10 +-
 .../0022-backup-do-not-use-bdrv_drain_all.patch    |  10 +-
 .../patches/pve/0023-internal-snapshot-async.patch |  68 +++---
 .../pve/0024-backup-vma-allow-empty-backups.patch  |   4 +-
 ...add-BlockDriver-to-bdrv_open-in-extract_c.patch |   4 +-
 debian/patches/pve/0026-glusterfs-daemonize.patch  |   8 +-
 ...-possiblity-to-specify-a-secondary-server.patch |  24 +-
 .../patches/pve/0028-qmp-add-get_link_status.patch |  20 +-
 debian/patches/pve/0029-smm_available-false.patch  |   6 +-
 ...whitespace-between-VERSION-and-PKGVERSION.patch |   8 +-
 debian/patches/pve/0031-vma-add-firewall.patch     |  24 +-
 ...0032-vma-writer-aio_set_fd_handler-update.patch |   4 +-
 ...3-vma-bdrv_open-dropped-the-drv-parameter.patch |   4 +-
 ...ckdev-bdrv_open-dropped-the-drv-parameter.patch |   8 +-
 ...kdev-backup_start-now-takes-a-BlockJobTxn.patch |   8 +-
 ...vevm-async-migration-and-bdrv_open-update.patch |   4 +-
 ...marshal_-renames-for-pve-monitor-commands.patch |   8 +-
 ...pi-qmp_mashal_-renames-for-async-snapshot.patch |   8 +-
 ...i-qmp_mashal_-renames-for-get_link_status.patch |   8 +-
 .../pve/0040-vnc-make-x509-imply-tls-again.patch   |   8 +-
 .../patches/pve/0041-PVE-VNC-authentication.patch  |  60 ++---
 ...riter-don-t-bail-out-on-zero-length-files.patch |   4 +-
 ...-vma-better-driver-guessing-for-bdrv_open.patch |   4 +-
 ...lock-add-the-zeroinit-block-driver-filter.patch | 248 +++++++++++++++++++++
 debian/patches/pve/0044-block-add-zeroinit.patch   | 248 ---------------------
 ...5-vma-add-format-option-to-device-mapping.patch |   4 +-
 ...6-pve-cleanup-includes-all-over-the-place.patch |   4 +-
 ...nit-bdrv_get_block_status-got-a-new-param.patch |   4 +-
 .../pve/0048-BDRV_O_CACHE_WB-was-removed.patch     |  12 +-
 ...up-bdrv_set_enable_write_cache-is-no-more.patch |   6 +-
 ...050-fix-possible-unitialised-return-value.patch |   6 +-
 ...1-net-NET_CLIENT_OPTIONS_KIND_MAX-changed.patch |   6 +-
 .../0052-vnc-refactor-to-QIOChannelSocket.patch    |   7 +-
 .../pve/0053-vma-use-BlockBackend-on-extract.patch |   4 +-
 ...-rbd_cache_writethrough_until_flush-with-.patch |   4 +-
 ...e-unsafe-for-vma-extract_content-and-qmp_.patch |  44 ++++
 debian/patches/series                              |   3 +-
 57 files changed, 605 insertions(+), 561 deletions(-)
 create mode 100644 debian/patches/pve/0044-block-add-the-zeroinit-block-driver-filter.patch
 delete mode 100644 debian/patches/pve/0044-block-add-zeroinit.patch
 create mode 100644 debian/patches/pve/0055-enable-cache-unsafe-for-vma-extract_content-and-qmp_.patch

diff --git a/debian/patches/pve/0001-fr-ca-keymap-corrections.patch b/debian/patches/pve/0001-fr-ca-keymap-corrections.patch
index 61a787c..19aac7a 100644
--- a/debian/patches/pve/0001-fr-ca-keymap-corrections.patch
+++ b/debian/patches/pve/0001-fr-ca-keymap-corrections.patch
@@ -1,7 +1,7 @@
-From 8b78306f012aee8d9c24dca9c21b6d584535a152 Mon Sep 17 00:00:00 2001
+From 0dc734b8304318e7a4f9a0ca756f72fc7d0f543e Mon Sep 17 00:00:00 2001
 From: Wolfgang Bumiller <w.bumiller at proxmox.com>
 Date: Wed, 9 Dec 2015 14:15:49 +0100
-Subject: [PATCH 01/41] fr-ca keymap corrections
+Subject: [PATCH 01/55] fr-ca keymap corrections
 
 ---
  pc-bios/keymaps/fr-ca | 9 +++++++++
diff --git a/debian/patches/pve/0002-Adjust-network-script-path-to-etc-kvm.patch b/debian/patches/pve/0002-Adjust-network-script-path-to-etc-kvm.patch
index 0620e6a..485db2d 100644
--- a/debian/patches/pve/0002-Adjust-network-script-path-to-etc-kvm.patch
+++ b/debian/patches/pve/0002-Adjust-network-script-path-to-etc-kvm.patch
@@ -1,14 +1,14 @@
-From 2644578e27b6f57a1008b0df56c02c9c96570077 Mon Sep 17 00:00:00 2001
+From 896141c8e486d45be140e53b395f81866b7af776 Mon Sep 17 00:00:00 2001
 From: Wolfgang Bumiller <w.bumiller at proxmox.com>
 Date: Wed, 9 Dec 2015 14:16:49 +0100
-Subject: [PATCH 02/41] Adjust network script path to /etc/kvm/
+Subject: [PATCH 02/55] Adjust network script path to /etc/kvm/
 
 ---
  include/net/net.h | 5 +++--
  1 file changed, 3 insertions(+), 2 deletions(-)
 
 diff --git a/include/net/net.h b/include/net/net.h
-index 7af3e15..f003ce0 100644
+index 73e4c46..4267008 100644
 --- a/include/net/net.h
 +++ b/include/net/net.h
 @@ -198,8 +198,9 @@ void qmp_netdev_add(QDict *qdict, QObject **ret, Error **errp);
diff --git a/debian/patches/pve/0003-vnc-altgr-emulation.patch b/debian/patches/pve/0003-vnc-altgr-emulation.patch
index 6d78360..6a48ef9 100644
--- a/debian/patches/pve/0003-vnc-altgr-emulation.patch
+++ b/debian/patches/pve/0003-vnc-altgr-emulation.patch
@@ -1,17 +1,17 @@
-From 6a05de70fb7a5c34fdee915a0aa080a6bf76aba0 Mon Sep 17 00:00:00 2001
+From 4d774ad7b71342c5e3ba2f1f5ac9d051eb835270 Mon Sep 17 00:00:00 2001
 From: Wolfgang Bumiller <w.bumiller at proxmox.com>
 Date: Wed, 9 Dec 2015 14:17:38 +0100
-Subject: [PATCH 03/41] vnc: altgr emulation
+Subject: [PATCH 03/55] vnc: altgr emulation
 
 ---
  ui/vnc.c | 24 +++++++++++++++++++++++-
  1 file changed, 23 insertions(+), 1 deletion(-)
 
 diff --git a/ui/vnc.c b/ui/vnc.c
-index cbe4d33..ae5a4fe 100644
+index 3e89dad..88a5824 100644
 --- a/ui/vnc.c
 +++ b/ui/vnc.c
-@@ -1797,6 +1797,10 @@ static void kbd_leds(void *opaque, int ledstate)
+@@ -1711,6 +1711,10 @@ static void kbd_leds(void *opaque, int ledstate)
  
  static void do_key_event(VncState *vs, int down, int keycode, int sym)
  {
@@ -22,7 +22,7 @@ index cbe4d33..ae5a4fe 100644
      /* QEMU console switch */
      switch(keycode) {
      case 0x2a:                          /* Left Shift */
-@@ -1877,7 +1881,24 @@ static void do_key_event(VncState *vs, int down, int keycode, int sym)
+@@ -1791,7 +1795,24 @@ static void do_key_event(VncState *vs, int down, int keycode, int sym)
      }
  
      if (qemu_console_is_graphic(NULL)) {
@@ -47,7 +47,7 @@ index cbe4d33..ae5a4fe 100644
      } else {
          bool numlock = vs->modifiers_state[0x45];
          bool control = (vs->modifiers_state[0x1d] ||
-@@ -2016,7 +2037,8 @@ static void key_event(VncState *vs, int down, uint32_t sym)
+@@ -1930,7 +1951,8 @@ static void key_event(VncState *vs, int down, uint32_t sym)
          lsym = lsym - 'A' + 'a';
      }
  
diff --git a/debian/patches/pve/0004-qemu-img-return-success-on-info-without-snapshots.patch b/debian/patches/pve/0004-qemu-img-return-success-on-info-without-snapshots.patch
index 7099699..62eb5dc 100644
--- a/debian/patches/pve/0004-qemu-img-return-success-on-info-without-snapshots.patch
+++ b/debian/patches/pve/0004-qemu-img-return-success-on-info-without-snapshots.patch
@@ -1,17 +1,17 @@
-From 12fbca3c45d694c89e84fb9522e9855b2b8a9952 Mon Sep 17 00:00:00 2001
+From bf9ce905d69ec3ac335d69a5ac578a52a96da204 Mon Sep 17 00:00:00 2001
 From: Wolfgang Bumiller <w.bumiller at proxmox.com>
 Date: Wed, 9 Dec 2015 14:18:46 +0100
-Subject: [PATCH 04/54] qemu-img: return success on info without snapshots
+Subject: [PATCH 04/55] qemu-img: return success on info without snapshots
 
 ---
  qemu-img.c | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
 
 diff --git a/qemu-img.c b/qemu-img.c
-index 033011c..e0637f2 100644
+index 46f2a6d..418e2d6 100644
 --- a/qemu-img.c
 +++ b/qemu-img.c
-@@ -2112,7 +2112,8 @@ static int img_info(int argc, char **argv)
+@@ -2361,7 +2361,8 @@ static int img_info(int argc, char **argv)
  
      list = collect_image_info_list(image_opts, filename, fmt, chain);
      if (!list) {
diff --git a/debian/patches/pve/0005-use-kvm-by-default.patch b/debian/patches/pve/0005-use-kvm-by-default.patch
index 91e665a..5c97e23 100644
--- a/debian/patches/pve/0005-use-kvm-by-default.patch
+++ b/debian/patches/pve/0005-use-kvm-by-default.patch
@@ -1,17 +1,17 @@
-From d6e2e550fee6c0c3468585c4885237a080468ecf Mon Sep 17 00:00:00 2001
+From c727dd8049e617a814e6b537648e0145190084e2 Mon Sep 17 00:00:00 2001
 From: Wolfgang Bumiller <w.bumiller at proxmox.com>
 Date: Wed, 9 Dec 2015 14:27:05 +0100
-Subject: [PATCH 05/41] use kvm by default
+Subject: [PATCH 05/55] use kvm by default
 
 ---
  accel.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/accel.c b/accel.c
-index 74e41da..66e2e58 100644
+index 0510b90..afe9a0d 100644
 --- a/accel.c
 +++ b/accel.c
-@@ -87,8 +87,8 @@ int configure_accelerator(MachineState *ms)
+@@ -88,8 +88,8 @@ int configure_accelerator(MachineState *ms)
  
      p = qemu_opt_get(qemu_get_machine_opts(), "accel");
      if (p == NULL) {
diff --git a/debian/patches/pve/0006-virtio-balloon-fix-query.patch b/debian/patches/pve/0006-virtio-balloon-fix-query.patch
index a73a01f..398d67e 100644
--- a/debian/patches/pve/0006-virtio-balloon-fix-query.patch
+++ b/debian/patches/pve/0006-virtio-balloon-fix-query.patch
@@ -1,7 +1,7 @@
-From f447be06707ec553c22a1f364b5a93e49409084f Mon Sep 17 00:00:00 2001
+From 08cbc3ac32dfefc5557bf62ea230a10ad46083b1 Mon Sep 17 00:00:00 2001
 From: Wolfgang Bumiller <w.bumiller at proxmox.com>
 Date: Wed, 9 Dec 2015 14:27:49 +0100
-Subject: [PATCH 06/41] virtio-balloon: fix query
+Subject: [PATCH 06/55] virtio-balloon: fix query
 
 Actually provide memory information via the query-balloon
 command.
@@ -13,10 +13,10 @@ command.
  4 files changed, 94 insertions(+), 5 deletions(-)
 
 diff --git a/hmp.c b/hmp.c
-index 2140605..0e63ea8 100644
+index d510236..fe80757 100644
 --- a/hmp.c
 +++ b/hmp.c
-@@ -676,7 +676,35 @@ void hmp_info_balloon(Monitor *mon, const QDict *qdict)
+@@ -686,7 +686,35 @@ void hmp_info_balloon(Monitor *mon, const QDict *qdict)
          return;
      }
  
@@ -54,10 +54,10 @@ index 2140605..0e63ea8 100644
      qapi_free_BalloonInfo(info);
  }
 diff --git a/hw/virtio/virtio-balloon.c b/hw/virtio/virtio-balloon.c
-index 9671635..369c856 100644
+index 9dbe681..50b20f1 100644
 --- a/hw/virtio/virtio-balloon.c
 +++ b/hw/virtio/virtio-balloon.c
-@@ -324,8 +324,37 @@ static uint64_t virtio_balloon_get_features(VirtIODevice *vdev, uint64_t f,
+@@ -379,8 +379,37 @@ static uint64_t virtio_balloon_get_features(VirtIODevice *vdev, uint64_t f,
  static void virtio_balloon_stat(void *opaque, BalloonInfo *info)
  {
      VirtIOBalloon *dev = opaque;
@@ -98,10 +98,10 @@ index 9671635..369c856 100644
  
  static void virtio_balloon_to_target(void *opaque, ram_addr_t target)
 diff --git a/qapi-schema.json b/qapi-schema.json
-index 8b1a423..9f54ebf 100644
+index 54634c4..639f7b6 100644
 --- a/qapi-schema.json
 +++ b/qapi-schema.json
-@@ -1145,10 +1145,29 @@
+@@ -1217,10 +1217,29 @@
  #
  # @actual: the number of bytes the balloon currently contains
  #
@@ -134,10 +134,10 @@ index 8b1a423..9f54ebf 100644
  ##
  # @query-balloon:
 diff --git a/qmp-commands.hx b/qmp-commands.hx
-index 20a92f9..5c23d91 100644
+index de896a5..9388578 100644
 --- a/qmp-commands.hx
 +++ b/qmp-commands.hx
-@@ -3708,6 +3708,13 @@ Make an asynchronous request for balloon info. When the request completes a
+@@ -3815,6 +3815,13 @@ Make an asynchronous request for balloon info. When the request completes a
  json-object will be returned containing the following data:
  
  - "actual": current balloon value in bytes (json-int)
@@ -151,7 +151,7 @@ index 20a92f9..5c23d91 100644
  
  Example:
  
-@@ -3715,6 +3722,12 @@ Example:
+@@ -3822,6 +3829,12 @@ Example:
  <- {
        "return":{
           "actual":1073741824,
diff --git a/debian/patches/pve/0007-set-the-CPU-model-to-kvm64-32-instead-of-qemu64-32.patch b/debian/patches/pve/0007-set-the-CPU-model-to-kvm64-32-instead-of-qemu64-32.patch
index 7ade5c2..368b1ba 100644
--- a/debian/patches/pve/0007-set-the-CPU-model-to-kvm64-32-instead-of-qemu64-32.patch
+++ b/debian/patches/pve/0007-set-the-CPU-model-to-kvm64-32-instead-of-qemu64-32.patch
@@ -1,17 +1,17 @@
-From c868ddb3ae37b5d8932c491b3b8de46ac83c3189 Mon Sep 17 00:00:00 2001
+From cfeb66f21383c31c70e69165c80e65c1901e7fa1 Mon Sep 17 00:00:00 2001
 From: Wolfgang Bumiller <w.bumiller at proxmox.com>
 Date: Wed, 9 Dec 2015 14:30:21 +0100
-Subject: [PATCH 07/41] set the CPU model to kvm64/32 instead of qemu64/32
+Subject: [PATCH 07/55] set the CPU model to kvm64/32 instead of qemu64/32
 
 ---
  hw/i386/pc.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/hw/i386/pc.c b/hw/i386/pc.c
-index 5e20e07..a20df3c 100644
+index 99437e0..1225a99 100644
 --- a/hw/i386/pc.c
 +++ b/hw/i386/pc.c
-@@ -1128,9 +1128,9 @@ void pc_cpus_init(PCMachineState *pcms)
+@@ -1111,9 +1111,9 @@ void pc_cpus_init(PCMachineState *pcms)
      /* init CPUs */
      if (machine->cpu_model == NULL) {
  #ifdef TARGET_X86_64
diff --git a/debian/patches/pve/0008-qapi-modify-query-machines.patch b/debian/patches/pve/0008-qapi-modify-query-machines.patch
index eacc23b..227ef07 100644
--- a/debian/patches/pve/0008-qapi-modify-query-machines.patch
+++ b/debian/patches/pve/0008-qapi-modify-query-machines.patch
@@ -1,7 +1,7 @@
-From f3aa6523c91f0259f7168a8bbcf978b2e42168f7 Mon Sep 17 00:00:00 2001
+From 7ec55edfacec8698e6fde6e8be0163e57526be2b Mon Sep 17 00:00:00 2001
 From: Wolfgang Bumiller <w.bumiller at proxmox.com>
 Date: Wed, 9 Dec 2015 14:31:18 +0100
-Subject: [PATCH 08/41] qapi: modify query machines
+Subject: [PATCH 08/55] qapi: modify query machines
 
 provide '*is-current' in MachineInfo struct
 ---
@@ -10,10 +10,10 @@ provide '*is-current' in MachineInfo struct
  2 files changed, 8 insertions(+), 1 deletion(-)
 
 diff --git a/qapi-schema.json b/qapi-schema.json
-index 9f54ebf..3ac59c5 100644
+index 639f7b6..0e97da1 100644
 --- a/qapi-schema.json
 +++ b/qapi-schema.json
-@@ -2790,6 +2790,8 @@
+@@ -2941,6 +2941,8 @@
  #
  # @default: #optional whether the machine is default
  #
@@ -22,7 +22,7 @@ index 9f54ebf..3ac59c5 100644
  # @cpu-max: maximum number of CPUs supported by the machine type
  #           (since 1.5.0)
  #
-@@ -2797,7 +2799,7 @@
+@@ -2948,7 +2950,7 @@
  ##
  { 'struct': 'MachineInfo',
    'data': { 'name': 'str', '*alias': 'str',
@@ -32,10 +32,10 @@ index 9f54ebf..3ac59c5 100644
  ##
  # @query-machines:
 diff --git a/vl.c b/vl.c
-index 4211ff1..77c734e 100644
+index 5db5dc2..feeb2c4 100644
 --- a/vl.c
 +++ b/vl.c
-@@ -1523,6 +1523,11 @@ MachineInfoList *qmp_query_machines(Error **errp)
+@@ -1538,6 +1538,11 @@ MachineInfoList *qmp_query_machines(Error **errp)
          info->name = g_strdup(mc->name);
          info->cpu_max = !mc->max_cpus ? 1 : mc->max_cpus;
  
diff --git a/debian/patches/pve/0009-qapi-modify-spice-query.patch b/debian/patches/pve/0009-qapi-modify-spice-query.patch
index b726305..64deb6b 100644
--- a/debian/patches/pve/0009-qapi-modify-spice-query.patch
+++ b/debian/patches/pve/0009-qapi-modify-spice-query.patch
@@ -1,7 +1,7 @@
-From d72cdaed95ca8c8d39b367e187bcc03f0c3c3e42 Mon Sep 17 00:00:00 2001
+From 63b3b17a2ae5d373f49191bb0828b5dc9128b04b Mon Sep 17 00:00:00 2001
 From: Wolfgang Bumiller <w.bumiller at proxmox.com>
 Date: Wed, 9 Dec 2015 14:32:11 +0100
-Subject: [PATCH 09/41] qapi: modify spice query
+Subject: [PATCH 09/55] qapi: modify spice query
 
 Provide the last ticket in the SpiceInfo struct optionally.
 ---
@@ -10,10 +10,10 @@ Provide the last ticket in the SpiceInfo struct optionally.
  2 files changed, 8 insertions(+)
 
 diff --git a/qapi-schema.json b/qapi-schema.json
-index 3ac59c5..1aa434d 100644
+index 0e97da1..f9ccfe4 100644
 --- a/qapi-schema.json
 +++ b/qapi-schema.json
-@@ -1120,11 +1120,14 @@
+@@ -1192,11 +1192,14 @@
  #
  # @channels: a list of @SpiceChannel for each active spice channel
  #
@@ -29,10 +29,10 @@ index 3ac59c5..1aa434d 100644
  
  ##
 diff --git a/ui/spice-core.c b/ui/spice-core.c
-index 6a62d71..05d24a1 100644
+index da05054..acf5a73 100644
 --- a/ui/spice-core.c
 +++ b/ui/spice-core.c
-@@ -537,6 +537,11 @@ SpiceInfo *qmp_query_spice(Error **errp)
+@@ -543,6 +543,11 @@ SpiceInfo *qmp_query_spice(Error **errp)
      micro = SPICE_SERVER_VERSION & 0xff;
      info->compiled_version = g_strdup_printf("%d.%d.%d", major, minor, micro);
  
diff --git a/debian/patches/pve/0010-ui-spice-default-to-pve-certs-unless-otherwise-speci.patch b/debian/patches/pve/0010-ui-spice-default-to-pve-certs-unless-otherwise-speci.patch
index c25ed76..7bf6a2a 100644
--- a/debian/patches/pve/0010-ui-spice-default-to-pve-certs-unless-otherwise-speci.patch
+++ b/debian/patches/pve/0010-ui-spice-default-to-pve-certs-unless-otherwise-speci.patch
@@ -1,7 +1,7 @@
-From 91c8e884d18a4b76d30422b977ee03386eebe73d Mon Sep 17 00:00:00 2001
+From 46cd19688c9134e5fa0eef9d31d005430bdae29a Mon Sep 17 00:00:00 2001
 From: Wolfgang Bumiller <w.bumiller at proxmox.com>
 Date: Wed, 9 Dec 2015 14:33:34 +0100
-Subject: [PATCH 10/41] ui/spice: default to pve certs unless otherwise
+Subject: [PATCH 10/55] ui/spice: default to pve certs unless otherwise
  specified
 
 ---
@@ -9,10 +9,10 @@ Subject: [PATCH 10/41] ui/spice: default to pve certs unless otherwise
  1 file changed, 9 insertions(+), 6 deletions(-)
 
 diff --git a/ui/spice-core.c b/ui/spice-core.c
-index 05d24a1..6ed91f6 100644
+index acf5a73..4f1cf45 100644
 --- a/ui/spice-core.c
 +++ b/ui/spice-core.c
-@@ -669,32 +669,35 @@ void qemu_spice_init(void)
+@@ -676,32 +676,35 @@ void qemu_spice_init(void)
  
      if (tls_port) {
          x509_dir = qemu_opt_get(opts, "x509-dir");
diff --git a/debian/patches/pve/0011-introduce-new-vma-archive-format.patch b/debian/patches/pve/0011-introduce-new-vma-archive-format.patch
index 1c26209..3ffd33d 100644
--- a/debian/patches/pve/0011-introduce-new-vma-archive-format.patch
+++ b/debian/patches/pve/0011-introduce-new-vma-archive-format.patch
@@ -1,7 +1,7 @@
-From 04b6468a295871877b55fe792c566839e2afe29c Mon Sep 17 00:00:00 2001
+From 1ef80c8a5ce360bbff1a9daa1c191e9238855408 Mon Sep 17 00:00:00 2001
 From: Dietmar Maurer <dietmar at proxmox.com>
 Date: Tue, 13 Nov 2012 11:11:38 +0100
-Subject: [PATCH 11/54] introduce new vma archive format
+Subject: [PATCH 11/55] introduce new vma archive format
 
 This is a very simple archive format, see docs/specs/vma_spec.txt
 
@@ -20,10 +20,10 @@ Signed-off-by: Dietmar Maurer <dietmar at proxmox.com>
  create mode 100644 vma.h
 
 diff --git a/Makefile b/Makefile
-index 930ac27..6cedc40 100644
+index 1d076a9..4e41399 100644
 --- a/Makefile
 +++ b/Makefile
-@@ -166,7 +166,7 @@ ifneq ($(wildcard config-host.mak),)
+@@ -167,7 +167,7 @@ ifneq ($(wildcard config-host.mak),)
  include $(SRC_PATH)/tests/Makefile
  endif
  
@@ -41,10 +41,10 @@ index 930ac27..6cedc40 100644
  qemu-bridge-helper$(EXESUF): qemu-bridge-helper.o libqemuutil.a libqemustub.a
  
 diff --git a/Makefile.objs b/Makefile.objs
-index 77be052..97d2bcc 100644
+index 8f705f6..5fd0bc4 100644
 --- a/Makefile.objs
 +++ b/Makefile.objs
-@@ -14,6 +14,7 @@ block-obj-$(CONFIG_POSIX) += aio-posix.o
+@@ -15,6 +15,7 @@ block-obj-$(CONFIG_POSIX) += aio-posix.o
  block-obj-$(CONFIG_WIN32) += aio-win32.o
  block-obj-y += block/
  block-obj-y += qemu-io-cmds.o
diff --git a/debian/patches/pve/0012-vma-add-verify-command.patch b/debian/patches/pve/0012-vma-add-verify-command.patch
index 8be88bc..18cf5aa 100644
--- a/debian/patches/pve/0012-vma-add-verify-command.patch
+++ b/debian/patches/pve/0012-vma-add-verify-command.patch
@@ -1,7 +1,7 @@
-From 9a6a1d5a6a3b0024ee2c664924cd67fb4cb43e46 Mon Sep 17 00:00:00 2001
+From 5a03baace683a297371dbe36795a517d68fc2727 Mon Sep 17 00:00:00 2001
 From: Dietmar Maurer <dietmar at proxmox.com>
 Date: Mon, 11 Mar 2013 07:07:46 +0100
-Subject: [PATCH 12/41] vma: add verify command
+Subject: [PATCH 12/55] vma: add verify command
 
 Users wants to verify the archive after backup.
 
diff --git a/debian/patches/pve/0013-vma-add-config-command-to-dump-the-config.patch b/debian/patches/pve/0013-vma-add-config-command-to-dump-the-config.patch
index 6e1e0dc..a268a15 100644
--- a/debian/patches/pve/0013-vma-add-config-command-to-dump-the-config.patch
+++ b/debian/patches/pve/0013-vma-add-config-command-to-dump-the-config.patch
@@ -1,7 +1,7 @@
-From 540980ecff5c1b5b1c21ef8493db51dbe5a4be69 Mon Sep 17 00:00:00 2001
+From 4cf741ef0ec95b62dab484f5630e0f5fd608220a Mon Sep 17 00:00:00 2001
 From: Wolfgang Bumiller <w.bumiller at proxmox.com>
 Date: Wed, 9 Dec 2015 14:46:49 +0100
-Subject: [PATCH 13/41] vma: add 'config' command to dump the config
+Subject: [PATCH 13/55] vma: add 'config' command to dump the config
 
 ---
  vma.c | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
diff --git a/debian/patches/pve/0014-vma-restore-tolerate-a-size-difference-up-to-4M.patch b/debian/patches/pve/0014-vma-restore-tolerate-a-size-difference-up-to-4M.patch
index a867d28..d9ff52d 100644
--- a/debian/patches/pve/0014-vma-restore-tolerate-a-size-difference-up-to-4M.patch
+++ b/debian/patches/pve/0014-vma-restore-tolerate-a-size-difference-up-to-4M.patch
@@ -1,7 +1,7 @@
-From e80fcf151b28c470fbf97cf38b68acec48ec7d18 Mon Sep 17 00:00:00 2001
+From b60a9ba781fc9e4f1a8c7d177f20933340cf4fc4 Mon Sep 17 00:00:00 2001
 From: Dietmar Maurer <dietmar at proxmox.com>
 Date: Tue, 26 Mar 2013 06:21:16 +0100
-Subject: [PATCH 14/41] vma restore: tolerate a size difference up to 4M
+Subject: [PATCH 14/55] vma restore: tolerate a size difference up to 4M
 
 Signed-off-by: Dietmar Maurer <dietmar at proxmox.com>
 ---
diff --git a/debian/patches/pve/0015-backup-modify-job-api.patch b/debian/patches/pve/0015-backup-modify-job-api.patch
index 3aae27c..08d7d44 100644
--- a/debian/patches/pve/0015-backup-modify-job-api.patch
+++ b/debian/patches/pve/0015-backup-modify-job-api.patch
@@ -1,7 +1,7 @@
-From 2ec6f9ec8443f3389c74e8e21353d01e516c4f46 Mon Sep 17 00:00:00 2001
+From 621e6e6521a550fd3be48ee33b0d1e9a39c0ed5c Mon Sep 17 00:00:00 2001
 From: Wolfgang Bumiller <w.bumiller at proxmox.com>
 Date: Wed, 9 Dec 2015 15:04:57 +0100
-Subject: [PATCH 15/54] backup: modify job api
+Subject: [PATCH 15/55] backup: modify job api
 
 Introduces a BackupDump function callback and a pause_count
 for backup_start. For a dump-backup the target parameter
@@ -13,10 +13,10 @@ can now be NULL so access to target needs to be guarded now.
  3 files changed, 65 insertions(+), 36 deletions(-)
 
 diff --git a/block/backup.c b/block/backup.c
-index 705bb77..7ac6b29 100644
+index 370c285..c38b520 100644
 --- a/block/backup.c
 +++ b/block/backup.c
-@@ -43,6 +43,7 @@ typedef struct BackupBlockJob {
+@@ -41,6 +41,7 @@ typedef struct BackupBlockJob {
      BdrvDirtyBitmap *sync_bitmap;
      MirrorSyncMode sync_mode;
      RateLimit limit;
@@ -24,7 +24,7 @@ index 705bb77..7ac6b29 100644
      BlockdevOnError on_source_error;
      BlockdevOnError on_target_error;
      CoRwlock flush_rwlock;
-@@ -147,14 +148,21 @@ static int coroutine_fn backup_do_cow(BlockDriverState *bs,
+@@ -153,14 +154,21 @@ static int coroutine_fn backup_do_cow(BlockDriverState *bs,
              goto out;
          }
  
@@ -52,7 +52,7 @@ index 705bb77..7ac6b29 100644
          }
          if (ret < 0) {
              trace_backup_do_cow_write_fail(job, start, ret);
-@@ -216,7 +224,7 @@ static void backup_iostatus_reset(BlockJob *job)
+@@ -222,7 +230,7 @@ static void backup_iostatus_reset(BlockJob *job)
  {
      BackupBlockJob *s = container_of(job, BackupBlockJob, common);
  
@@ -61,7 +61,7 @@ index 705bb77..7ac6b29 100644
          blk_iostatus_reset(s->target->blk);
      }
  }
-@@ -268,9 +276,11 @@ static BlockErrorAction backup_error_action(BackupBlockJob *job,
+@@ -274,9 +282,11 @@ static BlockErrorAction backup_error_action(BackupBlockJob *job,
      if (read) {
          return block_job_error_action(&job->common, job->common.bs,
                                        job->on_source_error, true, error);
@@ -116,7 +116,7 @@ index 705bb77..7ac6b29 100644
                    BlockJobTxn *txn, Error **errp)
  {
      int64_t len;
-@@ -507,7 +524,7 @@ void backup_start(BlockDriverState *bs, BlockDriverState *target,
+@@ -508,7 +525,7 @@ void backup_start(BlockDriverState *bs, BlockDriverState *target,
      int ret;
  
      assert(bs);
@@ -125,7 +125,7 @@ index 705bb77..7ac6b29 100644
      assert(cb);
  
      if (bs == target) {
-@@ -519,7 +535,7 @@ void backup_start(BlockDriverState *bs, BlockDriverState *target,
+@@ -529,7 +546,7 @@ void backup_start(BlockDriverState *bs, BlockDriverState *target,
          return;
      }
  
@@ -134,7 +134,7 @@ index 705bb77..7ac6b29 100644
          error_setg(errp, "Device is not inserted: %s",
                     bdrv_get_device_name(target));
          return;
-@@ -529,7 +545,7 @@ void backup_start(BlockDriverState *bs, BlockDriverState *target,
+@@ -539,7 +556,7 @@ void backup_start(BlockDriverState *bs, BlockDriverState *target,
          return;
      }
  
@@ -200,10 +200,10 @@ index 705bb77..7ac6b29 100644
      job->common.co = qemu_coroutine_create(backup_run);
      block_job_txn_add_job(txn, &job->common);
 diff --git a/blockdev.c b/blockdev.c
-index 80932e8..1796eaf 100644
+index 260a6f5..dfc5204 100644
 --- a/blockdev.c
 +++ b/blockdev.c
-@@ -3178,8 +3178,8 @@ static void do_drive_backup(const char *device, const char *target,
+@@ -3292,8 +3292,8 @@ static void do_drive_backup(const char *device, const char *target,
      }
  
      backup_start(bs, target_bs, speed, sync, bmap,
@@ -214,7 +214,7 @@ index 80932e8..1796eaf 100644
      if (local_err != NULL) {
          bdrv_unref(target_bs);
          error_propagate(errp, local_err);
-@@ -3268,7 +3268,7 @@ void do_blockdev_backup(const char *device, const char *target,
+@@ -3382,7 +3382,7 @@ void do_blockdev_backup(const char *device, const char *target,
      bdrv_ref(target_bs);
      bdrv_set_aio_context(target_bs, aio_context);
      backup_start(bs, target_bs, speed, sync, NULL, on_source_error,
@@ -224,7 +224,7 @@ index 80932e8..1796eaf 100644
          bdrv_unref(target_bs);
          error_propagate(errp, local_err);
 diff --git a/include/block/block_int.h b/include/block/block_int.h
-index 4012e36..f4b6ecd 100644
+index 10d8759..2dd866b 100644
 --- a/include/block/block_int.h
 +++ b/include/block/block_int.h
 @@ -60,6 +60,9 @@
@@ -237,7 +237,7 @@ index 4012e36..f4b6ecd 100644
  enum BdrvTrackedRequestType {
      BDRV_TRACKED_READ,
      BDRV_TRACKED_WRITE,
-@@ -679,7 +682,9 @@ void backup_start(BlockDriverState *bs, BlockDriverState *target,
+@@ -703,7 +706,9 @@ void backup_start(BlockDriverState *bs, BlockDriverState *target,
                    BdrvDirtyBitmap *sync_bitmap,
                    BlockdevOnError on_source_error,
                    BlockdevOnError on_target_error,
diff --git a/debian/patches/pve/0016-backup-add-pve-monitor-commands.patch b/debian/patches/pve/0016-backup-add-pve-monitor-commands.patch
index cfc93fa..32f0683 100644
--- a/debian/patches/pve/0016-backup-add-pve-monitor-commands.patch
+++ b/debian/patches/pve/0016-backup-add-pve-monitor-commands.patch
@@ -1,7 +1,7 @@
-From af106cee7626a76c7d24c838d07b437f48c2da2c Mon Sep 17 00:00:00 2001
+From 30e5d63f13a3f7adcd1f473fa0238c3e2e915114 Mon Sep 17 00:00:00 2001
 From: Wolfgang Bumiller <w.bumiller at proxmox.com>
 Date: Wed, 9 Dec 2015 15:20:56 +0100
-Subject: [PATCH 16/41] backup: add pve monitor commands
+Subject: [PATCH 16/55] backup: add pve monitor commands
 
 ---
  blockdev.c           | 438 +++++++++++++++++++++++++++++++++++++++++++++++++++
@@ -14,7 +14,7 @@ Subject: [PATCH 16/41] backup: add pve monitor commands
  7 files changed, 651 insertions(+)
 
 diff --git a/blockdev.c b/blockdev.c
-index 1796eaf..a346c55 100644
+index dfc5204..115524f 100644
 --- a/blockdev.c
 +++ b/blockdev.c
 @@ -52,6 +52,7 @@
@@ -25,7 +25,7 @@ index 1796eaf..a346c55 100644
  
  static QTAILQ_HEAD(, BlockDriverState) monitor_bdrv_states =
      QTAILQ_HEAD_INITIALIZER(monitor_bdrv_states);
-@@ -2986,6 +2987,443 @@ static void block_job_cb(void *opaque, int ret)
+@@ -2989,6 +2990,443 @@ static void block_job_cb(void *opaque, int ret)
      }
  }
  
@@ -470,7 +470,7 @@ index 1796eaf..a346c55 100644
                        bool has_base, const char *base,
                        bool has_backing_file, const char *backing_file,
 diff --git a/hmp-commands-info.hx b/hmp-commands-info.hx
-index 9b71351..355289a 100644
+index 52539c3..f872262 100644
 --- a/hmp-commands-info.hx
 +++ b/hmp-commands-info.hx
 @@ -502,6 +502,19 @@ STEXI
@@ -494,7 +494,7 @@ index 9b71351..355289a 100644
      {
          .name       = "usernet",
 diff --git a/hmp-commands.hx b/hmp-commands.hx
-index bb52e4d..324125f 100644
+index 4f4f60a..63c44f5 100644
 --- a/hmp-commands.hx
 +++ b/hmp-commands.hx
 @@ -87,6 +87,35 @@ STEXI
@@ -534,10 +534,10 @@ index bb52e4d..324125f 100644
          .name       = "block_job_set_speed",
          .args_type  = "device:B,speed:o",
 diff --git a/hmp.c b/hmp.c
-index 0e63ea8..ebb16c1 100644
+index fe80757..2d4bf97 100644
 --- a/hmp.c
 +++ b/hmp.c
-@@ -146,6 +146,44 @@ void hmp_info_mice(Monitor *mon, const QDict *qdict)
+@@ -148,6 +148,44 @@ void hmp_info_mice(Monitor *mon, const QDict *qdict)
      qapi_free_MouseInfoList(mice_list);
  }
  
@@ -582,7 +582,7 @@ index 0e63ea8..ebb16c1 100644
  void hmp_info_migrate(Monitor *mon, const QDict *qdict)
  {
      MigrationInfo *info;
-@@ -1461,6 +1499,29 @@ void hmp_block_stream(Monitor *mon, const QDict *qdict)
+@@ -1476,6 +1514,29 @@ void hmp_block_stream(Monitor *mon, const QDict *qdict)
      hmp_handle_error(mon, &error);
  }
  
@@ -613,7 +613,7 @@ index 0e63ea8..ebb16c1 100644
  {
      Error *error = NULL;
 diff --git a/hmp.h b/hmp.h
-index a8c5b5a..0b39c25 100644
+index 093d65f..c708b3f 100644
 --- a/hmp.h
 +++ b/hmp.h
 @@ -30,6 +30,7 @@ void hmp_info_migrate(Monitor *mon, const QDict *qdict);
@@ -634,10 +634,10 @@ index a8c5b5a..0b39c25 100644
  void hmp_block_job_cancel(Monitor *mon, const QDict *qdict);
  void hmp_block_job_pause(Monitor *mon, const QDict *qdict);
 diff --git a/qapi-schema.json b/qapi-schema.json
-index 1aa434d..edfb3a4 100644
+index f9ccfe4..4f673d4 100644
 --- a/qapi-schema.json
 +++ b/qapi-schema.json
-@@ -358,6 +358,95 @@
+@@ -356,6 +356,95 @@
  ##
  { 'command': 'query-events', 'returns': ['EventInfo'] }
  
@@ -734,10 +734,10 @@ index 1aa434d..edfb3a4 100644
  # @MigrationStats
  #
 diff --git a/qmp-commands.hx b/qmp-commands.hx
-index 5c23d91..3dea794 100644
+index 9388578..3f03c0d 100644
 --- a/qmp-commands.hx
 +++ b/qmp-commands.hx
-@@ -1254,6 +1254,24 @@ Example:
+@@ -1279,6 +1279,24 @@ Example:
  EQMP
  
      {
diff --git a/debian/patches/pve/0017-backup-vma-add-dir-format.patch b/debian/patches/pve/0017-backup-vma-add-dir-format.patch
index 42ba370..f1bf20c 100644
--- a/debian/patches/pve/0017-backup-vma-add-dir-format.patch
+++ b/debian/patches/pve/0017-backup-vma-add-dir-format.patch
@@ -1,7 +1,7 @@
-From bbf1558fc870eb4e72604b4d340ec317a59ac459 Mon Sep 17 00:00:00 2001
+From 0ea55080ddb9b9503dae8c35671a76fa5578572f Mon Sep 17 00:00:00 2001
 From: Wolfgang Bumiller <w.bumiller at proxmox.com>
 Date: Wed, 9 Dec 2015 15:21:54 +0100
-Subject: [PATCH 17/41] backup: vma: add dir format
+Subject: [PATCH 17/55] backup: vma: add dir format
 
 ---
  blockdev.c       | 126 +++++++++++++++++++++++++++++++++++++++++--------------
@@ -11,10 +11,10 @@ Subject: [PATCH 17/41] backup: vma: add dir format
  4 files changed, 104 insertions(+), 36 deletions(-)
 
 diff --git a/blockdev.c b/blockdev.c
-index a346c55..29a33c0 100644
+index 115524f..0537a53 100644
 --- a/blockdev.c
 +++ b/blockdev.c
-@@ -2900,6 +2900,8 @@ typedef struct PVEBackupDevInfo {
+@@ -3014,6 +3014,8 @@ typedef struct PVEBackupDevInfo {
      uint8_t dev_id;
      //bool started;
      bool completed;
@@ -23,7 +23,7 @@ index a346c55..29a33c0 100644
  } PVEBackupDevInfo;
  
  static void pvebackup_run_next_job(void);
-@@ -2968,8 +2970,6 @@ static void pvebackup_complete_cb(void *opaque, int ret)
+@@ -3082,8 +3084,6 @@ static void pvebackup_complete_cb(void *opaque, int ret)
  {
      PVEBackupDevInfo *di = opaque;
  
@@ -32,7 +32,7 @@ index a346c55..29a33c0 100644
      di->completed = true;
  
      if (ret < 0 && !backup_state.error) {
-@@ -2980,8 +2980,11 @@ static void pvebackup_complete_cb(void *opaque, int ret)
+@@ -3094,8 +3094,11 @@ static void pvebackup_complete_cb(void *opaque, int ret)
      BlockDriverState *bs = di->bs;
  
      di->bs = NULL;
@@ -45,7 +45,7 @@ index a346c55..29a33c0 100644
  
      block_job_cb(bs, ret);
  
-@@ -3060,6 +3063,7 @@ UuidInfo *qmp_backup(const char *backup_file, bool has_format,
+@@ -3174,6 +3177,7 @@ UuidInfo *qmp_backup(const char *backup_file, bool has_format,
  {
      BlockBackend *blk;
      BlockDriverState *bs = NULL;
@@ -53,7 +53,7 @@ index a346c55..29a33c0 100644
      Error *local_err = NULL;
      uuid_t uuid;
      VmaWriter *vmaw = NULL;
-@@ -3077,11 +3081,6 @@ UuidInfo *qmp_backup(const char *backup_file, bool has_format,
+@@ -3191,11 +3195,6 @@ UuidInfo *qmp_backup(const char *backup_file, bool has_format,
      /* Todo: try to auto-detect format based on file name */
      format = has_format ? format : BACKUP_FORMAT_VMA;
  
@@ -65,7 +65,7 @@ index a346c55..29a33c0 100644
      if (has_devlist) {
          devs = g_strsplit_set(devlist, ",;:", -1);
  
-@@ -3150,27 +3149,63 @@ UuidInfo *qmp_backup(const char *backup_file, bool has_format,
+@@ -3264,27 +3263,63 @@ UuidInfo *qmp_backup(const char *backup_file, bool has_format,
  
      uuid_generate(uuid);
  
@@ -145,7 +145,7 @@ index a346c55..29a33c0 100644
      }
  
      /* add configuration file to archive */
-@@ -3183,12 +3218,27 @@ UuidInfo *qmp_backup(const char *backup_file, bool has_format,
+@@ -3297,12 +3332,27 @@ UuidInfo *qmp_backup(const char *backup_file, bool has_format,
              goto err;
          }
  
@@ -178,7 +178,7 @@ index a346c55..29a33c0 100644
          g_free(cdata);
      }
  
-@@ -3228,10 +3278,11 @@ UuidInfo *qmp_backup(const char *backup_file, bool has_format,
+@@ -3342,10 +3392,11 @@ UuidInfo *qmp_backup(const char *backup_file, bool has_format,
          PVEBackupDevInfo *di = (PVEBackupDevInfo *)l->data;
          l = g_list_next(l);
  
@@ -191,7 +191,7 @@ index a346c55..29a33c0 100644
          if (local_err != NULL) {
              error_setg(&backup_state.error, "backup_job_create failed");
              pvebackup_cancel(NULL);
-@@ -3250,8 +3301,17 @@ err:
+@@ -3364,8 +3415,17 @@ err:
  
      l = di_list;
      while (l) {
@@ -210,7 +210,7 @@ index a346c55..29a33c0 100644
      }
      g_list_free(di_list);
  
-@@ -3265,6 +3325,10 @@ err:
+@@ -3379,6 +3439,10 @@ err:
          unlink(backup_file);
      }
  
@@ -222,7 +222,7 @@ index a346c55..29a33c0 100644
  }
  
 diff --git a/hmp-commands.hx b/hmp-commands.hx
-index 324125f..f6cc0e5 100644
+index 63c44f5..8a94e36 100644
 --- a/hmp-commands.hx
 +++ b/hmp-commands.hx
 @@ -89,9 +89,11 @@ ETEXI
@@ -241,10 +241,10 @@ index 324125f..f6cc0e5 100644
      },
  
 diff --git a/hmp.c b/hmp.c
-index ebb16c1..acc4aea 100644
+index 2d4bf97..040909e 100644
 --- a/hmp.c
 +++ b/hmp.c
-@@ -1512,11 +1512,13 @@ void hmp_backup(Monitor *mon, const QDict *qdict)
+@@ -1527,11 +1527,13 @@ void hmp_backup(Monitor *mon, const QDict *qdict)
  {
      Error *error = NULL;
  
@@ -260,10 +260,10 @@ index ebb16c1..acc4aea 100644
  
      hmp_handle_error(mon, &error);
 diff --git a/qapi-schema.json b/qapi-schema.json
-index edfb3a4..84978bd 100644
+index 4f673d4..3427d50 100644
 --- a/qapi-schema.json
 +++ b/qapi-schema.json
-@@ -397,7 +397,7 @@
+@@ -395,7 +395,7 @@
  # @vma: Proxmox vma backup format
  ##
  { 'enum': 'BackupFormat',
diff --git a/debian/patches/pve/0018-backup-do-not-return-errors-in-dump-callback.patch b/debian/patches/pve/0018-backup-do-not-return-errors-in-dump-callback.patch
index 2f07955..eaff295 100644
--- a/debian/patches/pve/0018-backup-do-not-return-errors-in-dump-callback.patch
+++ b/debian/patches/pve/0018-backup-do-not-return-errors-in-dump-callback.patch
@@ -1,17 +1,17 @@
-From 9b6ccb4512735cf5455a473f99a946371a466a3d Mon Sep 17 00:00:00 2001
+From 0db7b5b9c1799414788a43c3181c5b965d1b4be7 Mon Sep 17 00:00:00 2001
 From: Wolfgang Bumiller <w.bumiller at proxmox.com>
 Date: Wed, 9 Dec 2015 15:22:19 +0100
-Subject: [PATCH 18/41] backup: do not return errors in dump callback
+Subject: [PATCH 18/55] backup: do not return errors in dump callback
 
 ---
  blockdev.c | 26 ++++++++++++++++++++------
  1 file changed, 20 insertions(+), 6 deletions(-)
 
 diff --git a/blockdev.c b/blockdev.c
-index 29a33c0..9bb354c 100644
+index 0537a53..157cc44 100644
 --- a/blockdev.c
 +++ b/blockdev.c
-@@ -2912,6 +2912,11 @@ static int pvebackup_dump_cb(void *opaque, BlockDriverState *target,
+@@ -3026,6 +3026,11 @@ static int pvebackup_dump_cb(void *opaque, BlockDriverState *target,
  {
      PVEBackupDevInfo *di = opaque;
  
@@ -23,7 +23,7 @@ index 29a33c0..9bb354c 100644
      if (sector_num & 0x7f) {
          if (!backup_state.error) {
              error_setg(&backup_state.error,
-@@ -2922,7 +2927,6 @@ static int pvebackup_dump_cb(void *opaque, BlockDriverState *target,
+@@ -3036,7 +3041,6 @@ static int pvebackup_dump_cb(void *opaque, BlockDriverState *target,
      }
  
      int64_t cluster_num = sector_num >> 7;
@@ -31,7 +31,7 @@ index 29a33c0..9bb354c 100644
  
      int ret = -1;
  
-@@ -2930,17 +2934,27 @@ static int pvebackup_dump_cb(void *opaque, BlockDriverState *target,
+@@ -3044,17 +3048,27 @@ static int pvebackup_dump_cb(void *opaque, BlockDriverState *target,
          size_t zero_bytes = 0;
          ret = vma_writer_write(backup_state.vmaw, di->dev_id, cluster_num,
                                 buf, &zero_bytes);
@@ -63,7 +63,7 @@ index 29a33c0..9bb354c 100644
  }
  
  static void pvebackup_cleanup(void)
-@@ -3012,7 +3026,7 @@ static void pvebackup_cancel(void *opaque)
+@@ -3126,7 +3140,7 @@ static void pvebackup_cancel(void *opaque)
              BlockJob *job = di->bs->job;
              if (job) {
                  if (!di->completed) {
diff --git a/debian/patches/pve/0019-backup-vma-correctly-propagate-error.patch b/debian/patches/pve/0019-backup-vma-correctly-propagate-error.patch
index 3760ea3..4e652c6 100644
--- a/debian/patches/pve/0019-backup-vma-correctly-propagate-error.patch
+++ b/debian/patches/pve/0019-backup-vma-correctly-propagate-error.patch
@@ -1,7 +1,7 @@
-From e086d832f697115cc1f53ff535d677fcc09a86ef Mon Sep 17 00:00:00 2001
+From c6b074069e25ec722879f09672df89a446ef4f0a Mon Sep 17 00:00:00 2001
 From: Wolfgang Bumiller <w.bumiller at proxmox.com>
 Date: Wed, 9 Dec 2015 15:39:36 +0100
-Subject: [PATCH 19/41] backup: vma: correctly propagate error
+Subject: [PATCH 19/55] backup: vma: correctly propagate error
 
 ---
  blockdev.c   | 2 +-
@@ -10,10 +10,10 @@ Subject: [PATCH 19/41] backup: vma: correctly propagate error
  3 files changed, 9 insertions(+), 1 deletion(-)
 
 diff --git a/blockdev.c b/blockdev.c
-index 9bb354c..91aaf10 100644
+index 157cc44..0ea8189 100644
 --- a/blockdev.c
 +++ b/blockdev.c
-@@ -2936,7 +2936,7 @@ static int pvebackup_dump_cb(void *opaque, BlockDriverState *target,
+@@ -3050,7 +3050,7 @@ static int pvebackup_dump_cb(void *opaque, BlockDriverState *target,
                                 buf, &zero_bytes);
          if (ret < 0) {
              if (!backup_state.error) {
diff --git a/debian/patches/pve/0020-backup-vma-remove-async-queue.patch b/debian/patches/pve/0020-backup-vma-remove-async-queue.patch
index d13e178..43f9cb6 100644
--- a/debian/patches/pve/0020-backup-vma-remove-async-queue.patch
+++ b/debian/patches/pve/0020-backup-vma-remove-async-queue.patch
@@ -1,7 +1,7 @@
-From dccc1b41302d94857bf959ef2f25978f0ef674f1 Mon Sep 17 00:00:00 2001
+From 850534378187f82c34d962d35654dde6a47d956c Mon Sep 17 00:00:00 2001
 From: Wolfgang Bumiller <w.bumiller at proxmox.com>
 Date: Wed, 9 Dec 2015 15:40:00 +0100
-Subject: [PATCH 20/41] backup: vma: remove async queue
+Subject: [PATCH 20/55] backup: vma: remove async queue
 
 ---
  blockdev.c   |   6 ++
@@ -9,10 +9,10 @@ Subject: [PATCH 20/41] backup: vma: remove async queue
  2 files changed, 38 insertions(+), 147 deletions(-)
 
 diff --git a/blockdev.c b/blockdev.c
-index 91aaf10..c36888d 100644
+index 0ea8189..55c80c0 100644
 --- a/blockdev.c
 +++ b/blockdev.c
-@@ -3015,6 +3015,11 @@ static void pvebackup_cancel(void *opaque)
+@@ -3129,6 +3129,11 @@ static void pvebackup_cancel(void *opaque)
          error_setg(&backup_state.error, "backup cancelled");
      }
  
@@ -24,7 +24,7 @@ index 91aaf10..c36888d 100644
      /* drain all i/o (awake jobs waiting for aio) */
      bdrv_drain_all();
  
-@@ -3027,6 +3032,7 @@ static void pvebackup_cancel(void *opaque)
+@@ -3141,6 +3146,7 @@ static void pvebackup_cancel(void *opaque)
              if (job) {
                  if (!di->completed) {
                       block_job_cancel_sync(job);
diff --git a/debian/patches/pve/0021-backup-vma-run-flush-inside-coroutine.patch b/debian/patches/pve/0021-backup-vma-run-flush-inside-coroutine.patch
index a62c3e3..a1a9a7b 100644
--- a/debian/patches/pve/0021-backup-vma-run-flush-inside-coroutine.patch
+++ b/debian/patches/pve/0021-backup-vma-run-flush-inside-coroutine.patch
@@ -1,7 +1,7 @@
-From fe57d97e87fd49b03ce11d381f88fed546ea674d Mon Sep 17 00:00:00 2001
+From 60e4cc553c6ed53dd86e91ac143ad3aa8edcdbe7 Mon Sep 17 00:00:00 2001
 From: Wolfgang Bumiller <w.bumiller at proxmox.com>
 Date: Wed, 9 Dec 2015 15:40:42 +0100
-Subject: [PATCH 21/41] backup: vma: run flush inside coroutine
+Subject: [PATCH 21/55] backup: vma: run flush inside coroutine
 
 ---
  blockdev.c   | 10 +++++++++-
@@ -9,10 +9,10 @@ Subject: [PATCH 21/41] backup: vma: run flush inside coroutine
  2 files changed, 13 insertions(+), 1 deletion(-)
 
 diff --git a/blockdev.c b/blockdev.c
-index c36888d..8df70cb 100644
+index 55c80c0..2c51b95 100644
 --- a/blockdev.c
 +++ b/blockdev.c
-@@ -2980,6 +2980,13 @@ static void pvebackup_cleanup(void)
+@@ -3094,6 +3094,13 @@ static void pvebackup_cleanup(void)
      }
  }
  
@@ -26,7 +26,7 @@ index c36888d..8df70cb 100644
  static void pvebackup_complete_cb(void *opaque, int ret)
  {
      PVEBackupDevInfo *di = opaque;
-@@ -2997,7 +3004,8 @@ static void pvebackup_complete_cb(void *opaque, int ret)
+@@ -3111,7 +3118,8 @@ static void pvebackup_complete_cb(void *opaque, int ret)
      di->target = NULL;
  
      if (backup_state.vmaw) {
diff --git a/debian/patches/pve/0022-backup-do-not-use-bdrv_drain_all.patch b/debian/patches/pve/0022-backup-do-not-use-bdrv_drain_all.patch
index f572c4b..7c84955 100644
--- a/debian/patches/pve/0022-backup-do-not-use-bdrv_drain_all.patch
+++ b/debian/patches/pve/0022-backup-do-not-use-bdrv_drain_all.patch
@@ -1,17 +1,17 @@
-From 297edbbf4fcdb1ad1515fbfaeff530f97e9259ac Mon Sep 17 00:00:00 2001
+From 5848b90ad434c9c697e32cdd00a34708cfce24c5 Mon Sep 17 00:00:00 2001
 From: Wolfgang Bumiller <w.bumiller at proxmox.com>
 Date: Wed, 9 Dec 2015 15:41:13 +0100
-Subject: [PATCH 22/41] backup: do not use bdrv_drain_all
+Subject: [PATCH 22/55] backup: do not use bdrv_drain_all
 
 ---
  blockdev.c | 6 +-----
  1 file changed, 1 insertion(+), 5 deletions(-)
 
 diff --git a/blockdev.c b/blockdev.c
-index 8df70cb..4d182d6 100644
+index 2c51b95..0131e92 100644
 --- a/blockdev.c
 +++ b/blockdev.c
-@@ -3028,9 +3028,6 @@ static void pvebackup_cancel(void *opaque)
+@@ -3142,9 +3142,6 @@ static void pvebackup_cancel(void *opaque)
          vma_writer_set_error(backup_state.vmaw, "backup cancelled");
      }
  
@@ -21,7 +21,7 @@ index 8df70cb..4d182d6 100644
      GList *l = backup_state.di_list;
      while (l) {
          PVEBackupDevInfo *di = (PVEBackupDevInfo *)l->data;
-@@ -3039,8 +3036,7 @@ static void pvebackup_cancel(void *opaque)
+@@ -3153,8 +3150,7 @@ static void pvebackup_cancel(void *opaque)
              BlockJob *job = di->bs->job;
              if (job) {
                  if (!di->completed) {
diff --git a/debian/patches/pve/0023-internal-snapshot-async.patch b/debian/patches/pve/0023-internal-snapshot-async.patch
index 224e99e..0a51416 100644
--- a/debian/patches/pve/0023-internal-snapshot-async.patch
+++ b/debian/patches/pve/0023-internal-snapshot-async.patch
@@ -1,7 +1,7 @@
-From de27ffeb5f55764a51b435533311f1d627d26177 Mon Sep 17 00:00:00 2001
+From a53c35c25e703bc08198ec6ee02a86c79dae8aaa Mon Sep 17 00:00:00 2001
 From: Wolfgang Bumiller <w.bumiller at proxmox.com>
 Date: Wed, 9 Dec 2015 16:04:32 +0100
-Subject: [PATCH 23/41] internal snapshot async
+Subject: [PATCH 23/55] internal snapshot async
 
 ---
  Makefile.objs           |   1 +
@@ -22,10 +22,10 @@ Subject: [PATCH 23/41] internal snapshot async
  create mode 100644 savevm-async.c
 
 diff --git a/Makefile.objs b/Makefile.objs
-index 97d2bcc..7da098b 100644
+index 5fd0bc4..c3367dd 100644
 --- a/Makefile.objs
 +++ b/Makefile.objs
-@@ -48,6 +48,7 @@ common-obj-y += migration/
+@@ -54,6 +54,7 @@ common-obj-y += migration/
  common-obj-y += qemu-char.o #aio.o
  common-obj-y += page_cache.o
  common-obj-y += qjson.o
@@ -34,10 +34,10 @@ index 97d2bcc..7da098b 100644
  common-obj-$(CONFIG_SPICE) += spice-qemu-char.o
  
 diff --git a/block.c b/block.c
-index 3a7324b..5505afb 100644
+index d4939b4..bee5a8d 100644
 --- a/block.c
 +++ b/block.c
-@@ -2117,7 +2117,7 @@ void bdrv_replace_in_backing_chain(BlockDriverState *old, BlockDriverState *new)
+@@ -2332,7 +2332,7 @@ void bdrv_replace_in_backing_chain(BlockDriverState *old, BlockDriverState *new)
      bdrv_unref(old);
  }
  
@@ -47,7 +47,7 @@ index 3a7324b..5505afb 100644
      assert(!bs->job);
      assert(bdrv_op_blocker_is_empty(bs));
 diff --git a/hmp-commands-info.hx b/hmp-commands-info.hx
-index 355289a..1de0d77 100644
+index f872262..c213ef7 100644
 --- a/hmp-commands-info.hx
 +++ b/hmp-commands-info.hx
 @@ -588,6 +588,19 @@ Show current migration xbzrle cache size.
@@ -71,10 +71,10 @@ index 355289a..1de0d77 100644
          .args_type  = "",
          .params     = "",
 diff --git a/hmp-commands.hx b/hmp-commands.hx
-index f6cc0e5..1e1eb5d 100644
+index 8a94e36..2c0009a 100644
 --- a/hmp-commands.hx
 +++ b/hmp-commands.hx
-@@ -1789,3 +1789,35 @@ ETEXI
+@@ -1790,3 +1790,35 @@ ETEXI
  STEXI
  @end table
  ETEXI
@@ -111,10 +111,10 @@ index f6cc0e5..1e1eb5d 100644
 +        .mhandler.cmd = hmp_savevm_end,
 +    },
 diff --git a/hmp.c b/hmp.c
-index acc4aea..724b5d3 100644
+index 040909e..78644a7 100644
 --- a/hmp.c
 +++ b/hmp.c
-@@ -2107,6 +2107,63 @@ void hmp_info_memory_devices(Monitor *mon, const QDict *qdict)
+@@ -2093,6 +2093,63 @@ void hmp_info_memory_devices(Monitor *mon, const QDict *qdict)
      qapi_free_MemoryDeviceInfoList(info_list);
  }
  
@@ -179,7 +179,7 @@ index acc4aea..724b5d3 100644
  {
      IOThreadInfoList *info_list = qmp_query_iothreads(NULL);
 diff --git a/hmp.h b/hmp.h
-index 0b39c25..86d2672 100644
+index c708b3f..99bc949 100644
 --- a/hmp.h
 +++ b/hmp.h
 @@ -26,6 +26,7 @@ void hmp_info_status(Monitor *mon, const QDict *qdict);
@@ -202,10 +202,10 @@ index 0b39c25..86d2672 100644
  void hmp_screendump(Monitor *mon, const QDict *qdict);
  void hmp_nbd_server_start(Monitor *mon, const QDict *qdict);
 diff --git a/include/block/block.h b/include/block/block.h
-index 3477328..030599e 100644
+index 3a73137..fcc9cac 100644
 --- a/include/block/block.h
 +++ b/include/block/block.h
-@@ -265,6 +265,7 @@ BlockDriverState *bdrv_find_backing_image(BlockDriverState *bs,
+@@ -266,6 +266,7 @@ BlockDriverState *bdrv_find_backing_image(BlockDriverState *bs,
  int bdrv_get_backing_file_depth(BlockDriverState *bs);
  void bdrv_refresh_filename(BlockDriverState *bs);
  int bdrv_truncate(BlockDriverState *bs, int64_t offset);
@@ -214,10 +214,10 @@ index 3477328..030599e 100644
  int64_t bdrv_getlength(BlockDriverState *bs);
  int64_t bdrv_get_allocated_file_size(BlockDriverState *bs);
 diff --git a/include/sysemu/sysemu.h b/include/sysemu/sysemu.h
-index 3bb8897..cc47e29 100644
+index 38fb3ca..d4790a6 100644
 --- a/include/sysemu/sysemu.h
 +++ b/include/sysemu/sysemu.h
-@@ -79,6 +79,7 @@ void qemu_add_machine_init_done_notifier(Notifier *notify);
+@@ -78,6 +78,7 @@ void qemu_add_machine_init_done_notifier(Notifier *notify);
  
  void hmp_savevm(Monitor *mon, const QDict *qdict);
  int load_vmstate(const char *name);
@@ -225,7 +225,7 @@ index 3bb8897..cc47e29 100644
  void hmp_delvm(Monitor *mon, const QDict *qdict);
  void hmp_info_snapshots(Monitor *mon, const QDict *qdict);
  
-@@ -106,13 +107,13 @@ enum qemu_vm_cmd {
+@@ -105,13 +106,13 @@ enum qemu_vm_cmd {
  #define MAX_VM_CMD_PACKAGED_SIZE (1ul << 24)
  
  bool qemu_savevm_state_blocked(Error **errp);
@@ -242,10 +242,10 @@ index 3bb8897..cc47e29 100644
                                 uint64_t *res_non_postcopiable,
                                 uint64_t *res_postcopiable);
 diff --git a/migration/savevm.c b/migration/savevm.c
-index 0ad1b93..a1cf4b5 100644
+index 8346649..d6560f5 100644
 --- a/migration/savevm.c
 +++ b/migration/savevm.c
-@@ -891,11 +891,11 @@ void qemu_savevm_state_header(QEMUFile *f)
+@@ -896,11 +896,11 @@ void qemu_savevm_state_header(QEMUFile *f)
  
  }
  
@@ -259,7 +259,7 @@ index 0ad1b93..a1cf4b5 100644
  
      trace_savevm_state_begin();
      QTAILQ_FOREACH(se, &savevm_state.handlers, entry) {
-@@ -923,6 +923,7 @@ void qemu_savevm_state_begin(QEMUFile *f,
+@@ -928,6 +928,7 @@ void qemu_savevm_state_begin(QEMUFile *f,
              break;
          }
      }
@@ -267,7 +267,7 @@ index 0ad1b93..a1cf4b5 100644
  }
  
  /*
-@@ -1026,7 +1027,7 @@ void qemu_savevm_state_complete_postcopy(QEMUFile *f)
+@@ -1031,7 +1032,7 @@ void qemu_savevm_state_complete_postcopy(QEMUFile *f)
      qemu_fflush(f);
  }
  
@@ -276,7 +276,7 @@ index 0ad1b93..a1cf4b5 100644
  {
      QJSON *vmdesc;
      int vmdesc_len;
-@@ -1060,12 +1061,12 @@ void qemu_savevm_state_complete_precopy(QEMUFile *f, bool iterable_only)
+@@ -1065,12 +1066,12 @@ void qemu_savevm_state_complete_precopy(QEMUFile *f, bool iterable_only)
          save_section_footer(f, se);
          if (ret < 0) {
              qemu_file_set_error(f, ret);
@@ -291,7 +291,7 @@ index 0ad1b93..a1cf4b5 100644
      }
  
      vmdesc = qjson_new();
-@@ -1113,6 +1114,7 @@ void qemu_savevm_state_complete_precopy(QEMUFile *f, bool iterable_only)
+@@ -1117,6 +1118,7 @@ void qemu_savevm_state_complete_precopy(QEMUFile *f, bool iterable_only)
      object_unref(OBJECT(vmdesc));
  
      qemu_fflush(f);
@@ -300,10 +300,10 @@ index 0ad1b93..a1cf4b5 100644
  
  /* Give an estimate of the amount left to be transferred,
 diff --git a/qapi-schema.json b/qapi-schema.json
-index 84978bd..be51fa2 100644
+index 3427d50..2392139 100644
 --- a/qapi-schema.json
 +++ b/qapi-schema.json
-@@ -587,6 +587,42 @@
+@@ -585,6 +585,42 @@
             '*setup-time': 'int',
             '*x-cpu-throttle-percentage': 'int'} }
  
@@ -346,7 +346,7 @@ index 84978bd..be51fa2 100644
  ##
  # @query-migrate
  #
-@@ -3046,8 +3082,18 @@
+@@ -3197,8 +3233,18 @@
  #
  # Since: 1.2.0
  ##
@@ -366,10 +366,10 @@ index 84978bd..be51fa2 100644
  # @QKeyCode:
  #
 diff --git a/qemu-options.hx b/qemu-options.hx
-index 0eea4ee..cd465d5 100644
+index 6106520..20ab9ac 100644
 --- a/qemu-options.hx
 +++ b/qemu-options.hx
-@@ -3099,6 +3099,19 @@ STEXI
+@@ -3270,6 +3270,19 @@ STEXI
  Start right away with a saved state (@code{loadvm} in monitor)
  ETEXI
  
@@ -390,10 +390,10 @@ index 0eea4ee..cd465d5 100644
  DEF("daemonize", 0, QEMU_OPTION_daemonize, \
      "-daemonize      daemonize QEMU after initializing\n", QEMU_ARCH_ALL)
 diff --git a/qmp-commands.hx b/qmp-commands.hx
-index 3dea794..5ef8540 100644
+index 3f03c0d..437ddd6 100644
 --- a/qmp-commands.hx
 +++ b/qmp-commands.hx
-@@ -4675,6 +4675,36 @@ Example:
+@@ -4783,6 +4783,36 @@ Example:
  EQMP
  
      {
@@ -959,10 +959,10 @@ index 0000000..8117443
 +    return ret;
 +}
 diff --git a/vl.c b/vl.c
-index 77c734e..5379941 100644
+index feeb2c4..ba29593 100644
 --- a/vl.c
 +++ b/vl.c
-@@ -2985,6 +2985,7 @@ int main(int argc, char **argv, char **envp)
+@@ -2979,6 +2979,7 @@ int main(int argc, char **argv, char **envp)
      int optind;
      const char *optarg;
      const char *loadvm = NULL;
@@ -970,7 +970,7 @@ index 77c734e..5379941 100644
      MachineClass *machine_class;
      const char *cpu_model;
      const char *vga_model = NULL;
-@@ -3611,6 +3612,9 @@ int main(int argc, char **argv, char **envp)
+@@ -3612,6 +3613,9 @@ int main(int argc, char **argv, char **envp)
              case QEMU_OPTION_loadvm:
                  loadvm = optarg;
                  break;
@@ -980,7 +980,7 @@ index 77c734e..5379941 100644
              case QEMU_OPTION_full_screen:
                  full_screen = 1;
                  break;
-@@ -4656,6 +4660,10 @@ int main(int argc, char **argv, char **envp)
+@@ -4640,6 +4644,10 @@ int main(int argc, char **argv, char **envp)
          if (load_vmstate(loadvm) < 0) {
              autostart = 0;
          }
diff --git a/debian/patches/pve/0024-backup-vma-allow-empty-backups.patch b/debian/patches/pve/0024-backup-vma-allow-empty-backups.patch
index 5fbc749..25db720 100644
--- a/debian/patches/pve/0024-backup-vma-allow-empty-backups.patch
+++ b/debian/patches/pve/0024-backup-vma-allow-empty-backups.patch
@@ -1,7 +1,7 @@
-From b2dde9133b9369c29bc2902ac4d674a5ee268cf2 Mon Sep 17 00:00:00 2001
+From 7136f6d83dee1ee791c142ab0bb3d406589e9e13 Mon Sep 17 00:00:00 2001
 From: Wolfgang Bumiller <w.bumiller at proxmox.com>
 Date: Wed, 9 Dec 2015 16:31:51 +0100
-Subject: [PATCH 24/41] backup: vma: allow empty backups
+Subject: [PATCH 24/55] backup: vma: allow empty backups
 
 ---
  vma-reader.c | 29 ++++++++++-----------
diff --git a/debian/patches/pve/0025-backup-vma-add-BlockDriver-to-bdrv_open-in-extract_c.patch b/debian/patches/pve/0025-backup-vma-add-BlockDriver-to-bdrv_open-in-extract_c.patch
index 263f44f..71f9f1d 100644
--- a/debian/patches/pve/0025-backup-vma-add-BlockDriver-to-bdrv_open-in-extract_c.patch
+++ b/debian/patches/pve/0025-backup-vma-add-BlockDriver-to-bdrv_open-in-extract_c.patch
@@ -1,7 +1,7 @@
-From 194ceac1b39413a6a1eaeb8da62188effe3b5742 Mon Sep 17 00:00:00 2001
+From a88a0bf330a1ede68e867d7ae932b3ffd4d4911a Mon Sep 17 00:00:00 2001
 From: Wolfgang Bumiller <w.bumiller at proxmox.com>
 Date: Wed, 9 Dec 2015 16:32:39 +0100
-Subject: [PATCH 25/41] backup: vma: add BlockDriver to bdrv_open in
+Subject: [PATCH 25/55] backup: vma: add BlockDriver to bdrv_open in
  extract_content
 
 ---
diff --git a/debian/patches/pve/0026-glusterfs-daemonize.patch b/debian/patches/pve/0026-glusterfs-daemonize.patch
index c7c212d..61abcc2 100644
--- a/debian/patches/pve/0026-glusterfs-daemonize.patch
+++ b/debian/patches/pve/0026-glusterfs-daemonize.patch
@@ -1,17 +1,17 @@
-From 34ccb14434cfc6b61e568aa076bc09231df45981 Mon Sep 17 00:00:00 2001
+From 577243992461100d840e90b6018df958ee165a34 Mon Sep 17 00:00:00 2001
 From: Wolfgang Bumiller <w.bumiller at proxmox.com>
 Date: Wed, 9 Dec 2015 16:33:10 +0100
-Subject: [PATCH 26/41] glusterfs: daemonize
+Subject: [PATCH 26/55] glusterfs: daemonize
 
 ---
  block/gluster.c | 8 +++++---
  1 file changed, 5 insertions(+), 3 deletions(-)
 
 diff --git a/block/gluster.c b/block/gluster.c
-index 0857c14..e3c0dbc 100644
+index a8aaacf..9cf33e9 100644
 --- a/block/gluster.c
 +++ b/block/gluster.c
-@@ -196,9 +196,11 @@ static struct glfs *qemu_gluster_init(GlusterConf *gconf, const char *filename,
+@@ -198,9 +198,11 @@ static struct glfs *qemu_gluster_init(GlusterConf *gconf, const char *filename,
       * TODO: Use GF_LOG_ERROR instead of hard code value of 4 here when
       * GlusterFS makes GF_LOG_* macros available to libgfapi users.
       */
diff --git a/debian/patches/pve/0027-gluster-possiblity-to-specify-a-secondary-server.patch b/debian/patches/pve/0027-gluster-possiblity-to-specify-a-secondary-server.patch
index 439a39b..dd3babd 100644
--- a/debian/patches/pve/0027-gluster-possiblity-to-specify-a-secondary-server.patch
+++ b/debian/patches/pve/0027-gluster-possiblity-to-specify-a-secondary-server.patch
@@ -1,17 +1,17 @@
-From 7b58868a321a38585c20a6eecdaa52d2a85e8385 Mon Sep 17 00:00:00 2001
+From 15c3d8e19c9d7534441226229dd509e3a61ce82a Mon Sep 17 00:00:00 2001
 From: Wolfgang Bumiller <w.bumiller at proxmox.com>
 Date: Wed, 9 Dec 2015 16:33:25 +0100
-Subject: [PATCH 27/41] gluster: possiblity to specify a secondary server
+Subject: [PATCH 27/55] gluster: possiblity to specify a secondary server
 
 ---
  block/gluster.c | 40 +++++++++++++++++++++++++++++++---------
  1 file changed, 31 insertions(+), 9 deletions(-)
 
 diff --git a/block/gluster.c b/block/gluster.c
-index e3c0dbc..8946e82 100644
+index 9cf33e9..0377725 100644
 --- a/block/gluster.c
 +++ b/block/gluster.c
-@@ -26,6 +26,7 @@ typedef struct BDRVGlusterState {
+@@ -28,6 +28,7 @@ typedef struct BDRVGlusterState {
  
  typedef struct GlusterConf {
      char *server;
@@ -19,7 +19,7 @@ index e3c0dbc..8946e82 100644
      int port;
      char *volname;
      char *image;
-@@ -36,6 +37,7 @@ static void qemu_gluster_gconf_free(GlusterConf *gconf)
+@@ -38,6 +39,7 @@ static void qemu_gluster_gconf_free(GlusterConf *gconf)
  {
      if (gconf) {
          g_free(gconf->server);
@@ -27,7 +27,7 @@ index e3c0dbc..8946e82 100644
          g_free(gconf->volname);
          g_free(gconf->image);
          g_free(gconf->transport);
-@@ -69,7 +71,7 @@ static int parse_volume_options(GlusterConf *gconf, char *path)
+@@ -71,7 +73,7 @@ static int parse_volume_options(GlusterConf *gconf, char *path)
  }
  
  /*
@@ -36,7 +36,7 @@ index e3c0dbc..8946e82 100644
   *
   * 'gluster' is the protocol.
   *
-@@ -85,6 +87,8 @@ static int parse_volume_options(GlusterConf *gconf, char *path)
+@@ -87,6 +89,8 @@ static int parse_volume_options(GlusterConf *gconf, char *path)
   * The 'socket' field needs to be populated with the path to unix domain
   * socket.
   *
@@ -45,7 +45,7 @@ index e3c0dbc..8946e82 100644
   * 'port' is the port number on which glusterd is listening. This is optional
   * and if not specified, QEMU will send 0 which will make gluster to use the
   * default port. If the transport type is unix, then 'port' should not be
-@@ -97,6 +101,7 @@ static int parse_volume_options(GlusterConf *gconf, char *path)
+@@ -99,6 +103,7 @@ static int parse_volume_options(GlusterConf *gconf, char *path)
   * Examples:
   *
   * file=gluster://1.2.3.4/testvol/a.img
@@ -53,7 +53,7 @@ index e3c0dbc..8946e82 100644
   * file=gluster+tcp://1.2.3.4/testvol/a.img
   * file=gluster+tcp://1.2.3.4:24007/testvol/dir/a.img
   * file=gluster+tcp://[1:2:3:4:5:6:7:8]/testvol/dir/a.img
-@@ -111,6 +116,8 @@ static int qemu_gluster_parseuri(GlusterConf *gconf, const char *filename)
+@@ -113,6 +118,8 @@ static int qemu_gluster_parseuri(GlusterConf *gconf, const char *filename)
      QueryParams *qp = NULL;
      bool is_unix = false;
      int ret = 0;
@@ -62,7 +62,7 @@ index e3c0dbc..8946e82 100644
  
      uri = uri_parse(filename);
      if (!uri) {
-@@ -138,21 +145,28 @@ static int qemu_gluster_parseuri(GlusterConf *gconf, const char *filename)
+@@ -140,21 +147,28 @@ static int qemu_gluster_parseuri(GlusterConf *gconf, const char *filename)
      }
  
      qp = query_params_parse(uri->query);
@@ -98,7 +98,7 @@ index e3c0dbc..8946e82 100644
      } else {
          gconf->server = g_strdup(uri->server ? uri->server : "localhost");
          gconf->port = uri->port;
-@@ -176,7 +190,7 @@ static struct glfs *qemu_gluster_init(GlusterConf *gconf, const char *filename,
+@@ -178,7 +192,7 @@ static struct glfs *qemu_gluster_init(GlusterConf *gconf, const char *filename,
      ret = qemu_gluster_parseuri(gconf, filename);
      if (ret < 0) {
          error_setg(errp, "Usage: file=gluster[+transport]://[server[:port]]/"
@@ -107,7 +107,7 @@ index e3c0dbc..8946e82 100644
          errno = -ret;
          goto out;
      }
-@@ -192,6 +206,14 @@ static struct glfs *qemu_gluster_init(GlusterConf *gconf, const char *filename,
+@@ -194,6 +208,14 @@ static struct glfs *qemu_gluster_init(GlusterConf *gconf, const char *filename,
          goto out;
      }
  
diff --git a/debian/patches/pve/0028-qmp-add-get_link_status.patch b/debian/patches/pve/0028-qmp-add-get_link_status.patch
index 9ad59dd..d8c6803 100644
--- a/debian/patches/pve/0028-qmp-add-get_link_status.patch
+++ b/debian/patches/pve/0028-qmp-add-get_link_status.patch
@@ -1,7 +1,7 @@
-From 1f5975e6b428b0f62fd538b36880a23ec25da9f5 Mon Sep 17 00:00:00 2001
+From 9170833ae6e593326b1a37892282d4177ab7414e Mon Sep 17 00:00:00 2001
 From: Wolfgang Bumiller <w.bumiller at proxmox.com>
 Date: Wed, 9 Dec 2015 16:34:41 +0100
-Subject: [PATCH 28/41] qmp: add get_link_status
+Subject: [PATCH 28/55] qmp: add get_link_status
 
 ---
  net/net.c        | 27 +++++++++++++++++++++++++++
@@ -11,10 +11,10 @@ Subject: [PATCH 28/41] qmp: add get_link_status
  4 files changed, 67 insertions(+)
 
 diff --git a/net/net.c b/net/net.c
-index ade6051..afd6ea6 100644
+index 6b0b375..0e3f231 100644
 --- a/net/net.c
 +++ b/net/net.c
-@@ -1289,6 +1289,33 @@ void hmp_info_network(Monitor *mon, const QDict *qdict)
+@@ -1325,6 +1325,33 @@ void hmp_info_network(Monitor *mon, const QDict *qdict)
      }
  }
  
@@ -49,10 +49,10 @@ index ade6051..afd6ea6 100644
  {
      NetClientState *ncs[MAX_QUEUE_NUM];
 diff --git a/qapi-schema.json b/qapi-schema.json
-index be51fa2..172e200 100644
+index 2392139..d1985d2 100644
 --- a/qapi-schema.json
 +++ b/qapi-schema.json
-@@ -1653,6 +1653,21 @@
+@@ -1725,6 +1725,21 @@
  { 'command': 'set_link', 'data': {'name': 'str', 'up': 'bool'} }
  
  ##
@@ -75,10 +75,10 @@ index be51fa2..172e200 100644
  #
  # Request the balloon driver to change its balloon size.
 diff --git a/qmp-commands.hx b/qmp-commands.hx
-index 5ef8540..0ce913a 100644
+index 437ddd6..71c5d53 100644
 --- a/qmp-commands.hx
 +++ b/qmp-commands.hx
-@@ -1771,6 +1771,29 @@ Example:
+@@ -1844,6 +1844,29 @@ Example:
  EQMP
  
      {
@@ -109,10 +109,10 @@ index 5ef8540..0ce913a 100644
          .args_type  = "fdname:s",
          .params     = "getfd name",
 diff --git a/scripts/qapi.py b/scripts/qapi.py
-index 7c50cc4..8cb0f78 100644
+index b13ae47..088478a 100644
 --- a/scripts/qapi.py
 +++ b/scripts/qapi.py
-@@ -38,6 +38,8 @@ builtin_types = {
+@@ -39,6 +39,8 @@ builtin_types = {
  
  # Whitelist of commands allowed to return a non-dictionary
  returns_whitelist = [
diff --git a/debian/patches/pve/0029-smm_available-false.patch b/debian/patches/pve/0029-smm_available-false.patch
index 6ba51c9..a0a1593 100644
--- a/debian/patches/pve/0029-smm_available-false.patch
+++ b/debian/patches/pve/0029-smm_available-false.patch
@@ -1,7 +1,7 @@
-From 67eb6fa3ea9193e43e6744c17e0cbaf1294de1b9 Mon Sep 17 00:00:00 2001
+From 3aebb3903e61b8ceb7f0d302f8dfddfe7195c10e Mon Sep 17 00:00:00 2001
 From: Alexandre Derumier <aderumier at odiso.com>
 Date: Tue, 29 Sep 2015 15:37:44 +0200
-Subject: [PATCH 29/41] smm_available = false
+Subject: [PATCH 29/55] smm_available = false
 
 Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
 ---
@@ -9,7 +9,7 @@ Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/hw/i386/pc.c b/hw/i386/pc.c
-index a20df3c..ba166d7 100644
+index 1225a99..ceae96c 100644
 --- a/hw/i386/pc.c
 +++ b/hw/i386/pc.c
 @@ -1839,7 +1839,7 @@ bool pc_machine_is_smm_enabled(PCMachineState *pcms)
diff --git a/debian/patches/pve/0030-use-whitespace-between-VERSION-and-PKGVERSION.patch b/debian/patches/pve/0030-use-whitespace-between-VERSION-and-PKGVERSION.patch
index 870f861..f28a147 100644
--- a/debian/patches/pve/0030-use-whitespace-between-VERSION-and-PKGVERSION.patch
+++ b/debian/patches/pve/0030-use-whitespace-between-VERSION-and-PKGVERSION.patch
@@ -1,7 +1,7 @@
-From 2e29179b3ea1bd1f5db7c03aedc8dcea19980063 Mon Sep 17 00:00:00 2001
+From 011e629353ed4aeac6eeb7f1c9021b4906ae2946 Mon Sep 17 00:00:00 2001
 From: Wolfgang Bumiller <w.bumiller at proxmox.com>
 Date: Wed, 9 Dec 2015 16:50:05 +0100
-Subject: [PATCH 30/41] use whitespace between VERSION and PKGVERSION
+Subject: [PATCH 30/55] use whitespace between VERSION and PKGVERSION
 
 Our kvm version parser expects a white space or comma after
 the version string, see PVE::QemuServer::kvm_user_version()
@@ -10,10 +10,10 @@ the version string, see PVE::QemuServer::kvm_user_version()
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/vl.c b/vl.c
-index 5379941..63c6798 100644
+index ba29593..f393767 100644
 --- a/vl.c
 +++ b/vl.c
-@@ -1934,7 +1934,7 @@ static void main_loop(void)
+@@ -1949,7 +1949,7 @@ static void main_loop(void)
  
  static void version(void)
  {
diff --git a/debian/patches/pve/0031-vma-add-firewall.patch b/debian/patches/pve/0031-vma-add-firewall.patch
index bf89625..fa85138 100644
--- a/debian/patches/pve/0031-vma-add-firewall.patch
+++ b/debian/patches/pve/0031-vma-add-firewall.patch
@@ -1,7 +1,7 @@
-From b71180331cfe834000b469770c879a1277dbc273 Mon Sep 17 00:00:00 2001
+From a89fc66658089da88eae095b3faa377c25db0198 Mon Sep 17 00:00:00 2001
 From: Wolfgang Bumiller <w.bumiller at proxmox.com>
 Date: Wed, 9 Dec 2015 16:51:23 +0100
-Subject: [PATCH 31/41] vma: add firewall
+Subject: [PATCH 31/55] vma: add firewall
 
 ---
  blockdev.c       | 78 ++++++++++++++++++++++++++++++++++----------------------
@@ -11,10 +11,10 @@ Subject: [PATCH 31/41] vma: add firewall
  4 files changed, 51 insertions(+), 32 deletions(-)
 
 diff --git a/blockdev.c b/blockdev.c
-index 4d182d6..5e1234b 100644
+index 0131e92..dd4e4bd 100644
 --- a/blockdev.c
 +++ b/blockdev.c
-@@ -3056,6 +3056,44 @@ void qmp_backup_cancel(Error **errp)
+@@ -3170,6 +3170,44 @@ void qmp_backup_cancel(Error **errp)
      }
  }
  
@@ -59,7 +59,7 @@ index 4d182d6..5e1234b 100644
  static void pvebackup_run_next_job(void)
  {
      GList *l = backup_state.di_list;
-@@ -3082,6 +3120,7 @@ static void pvebackup_run_next_job(void)
+@@ -3196,6 +3234,7 @@ static void pvebackup_run_next_job(void)
  UuidInfo *qmp_backup(const char *backup_file, bool has_format,
                      BackupFormat format,
                      bool has_config_file, const char *config_file,
@@ -67,7 +67,7 @@ index 4d182d6..5e1234b 100644
                      bool has_devlist, const char *devlist,
                      bool has_speed, int64_t speed, Error **errp)
  {
-@@ -3234,38 +3273,17 @@ UuidInfo *qmp_backup(const char *backup_file, bool has_format,
+@@ -3348,38 +3387,17 @@ UuidInfo *qmp_backup(const char *backup_file, bool has_format,
  
      /* add configuration file to archive */
      if (has_config_file) {
@@ -116,10 +116,10 @@ index 4d182d6..5e1234b 100644
  
      backup_state.cancel = false;
 diff --git a/hmp.c b/hmp.c
-index 724b5d3..a361e26 100644
+index 78644a7..f989f01 100644
 --- a/hmp.c
 +++ b/hmp.c
-@@ -1518,7 +1518,7 @@ void hmp_backup(Monitor *mon, const QDict *qdict)
+@@ -1533,7 +1533,7 @@ void hmp_backup(Monitor *mon, const QDict *qdict)
      int64_t speed = qdict_get_try_int(qdict, "speed", 0);
  
      qmp_backup(backup_file, true, dir ? BACKUP_FORMAT_DIR : BACKUP_FORMAT_VMA,
@@ -129,10 +129,10 @@ index 724b5d3..a361e26 100644
  
      hmp_handle_error(mon, &error);
 diff --git a/qapi-schema.json b/qapi-schema.json
-index 172e200..a02158e 100644
+index d1985d2..2c31eb1 100644
 --- a/qapi-schema.json
 +++ b/qapi-schema.json
-@@ -422,6 +422,7 @@
+@@ -420,6 +420,7 @@
  { 'command': 'backup', 'data': { 'backup-file': 'str',
                                      '*format': 'BackupFormat',
                                      '*config-file': 'str',
@@ -141,10 +141,10 @@ index 172e200..a02158e 100644
    'returns': 'UuidInfo' }
  
 diff --git a/qmp-commands.hx b/qmp-commands.hx
-index 0ce913a..de07f54 100644
+index 71c5d53..964563e 100644
 --- a/qmp-commands.hx
 +++ b/qmp-commands.hx
-@@ -1255,7 +1255,7 @@ EQMP
+@@ -1280,7 +1280,7 @@ EQMP
  
      {
          .name       = "backup",
diff --git a/debian/patches/pve/0032-vma-writer-aio_set_fd_handler-update.patch b/debian/patches/pve/0032-vma-writer-aio_set_fd_handler-update.patch
index bf87033..ba47286 100644
--- a/debian/patches/pve/0032-vma-writer-aio_set_fd_handler-update.patch
+++ b/debian/patches/pve/0032-vma-writer-aio_set_fd_handler-update.patch
@@ -1,7 +1,7 @@
-From 712f8526b54566361c9d1e4cc81a40714f29a26f Mon Sep 17 00:00:00 2001
+From 2d152da7999e912f6fc104f81a1616c3c6d96a89 Mon Sep 17 00:00:00 2001
 From: Wolfgang Bumiller <w.bumiller at proxmox.com>
 Date: Thu, 10 Dec 2015 14:25:01 +0100
-Subject: [PATCH 32/41] vma-writer: aio_set_fd_handler update
+Subject: [PATCH 32/55] vma-writer: aio_set_fd_handler update
 
 passing 'false' as new is_external parameter to
 aio_set_fd_handler as per commit
diff --git a/debian/patches/pve/0033-vma-bdrv_open-dropped-the-drv-parameter.patch b/debian/patches/pve/0033-vma-bdrv_open-dropped-the-drv-parameter.patch
index ae17be5..98e6cb0 100644
--- a/debian/patches/pve/0033-vma-bdrv_open-dropped-the-drv-parameter.patch
+++ b/debian/patches/pve/0033-vma-bdrv_open-dropped-the-drv-parameter.patch
@@ -1,7 +1,7 @@
-From fecf3abe8512f12a33f8250cfb4e2687c62d4105 Mon Sep 17 00:00:00 2001
+From c0ca2a0437b4d648df1b54513c9f22a7519a328a Mon Sep 17 00:00:00 2001
 From: Wolfgang Bumiller <w.bumiller at proxmox.com>
 Date: Thu, 10 Dec 2015 14:43:07 +0100
-Subject: [PATCH 33/41] vma: bdrv_open dropped the drv parameter
+Subject: [PATCH 33/55] vma: bdrv_open dropped the drv parameter
 
 we now pass the 'drive' option via a qdict.
 As per commit:
diff --git a/debian/patches/pve/0034-blockdev-bdrv_open-dropped-the-drv-parameter.patch b/debian/patches/pve/0034-blockdev-bdrv_open-dropped-the-drv-parameter.patch
index e099efe..30e6574 100644
--- a/debian/patches/pve/0034-blockdev-bdrv_open-dropped-the-drv-parameter.patch
+++ b/debian/patches/pve/0034-blockdev-bdrv_open-dropped-the-drv-parameter.patch
@@ -1,7 +1,7 @@
-From 25a24c9dc28d7f2304b8667ff1d076630adc300a Mon Sep 17 00:00:00 2001
+From 548b3b099d230b1221edf8062341900679d83f3e Mon Sep 17 00:00:00 2001
 From: Wolfgang Bumiller <w.bumiller at proxmox.com>
 Date: Thu, 10 Dec 2015 14:46:59 +0100
-Subject: [PATCH 34/41] blockdev: bdrv_open dropped the drv parameter
+Subject: [PATCH 34/55] blockdev: bdrv_open dropped the drv parameter
 
 As per commit:
 6ebf9aa2ef: block: Drop drv parameter from bdrv_open()
@@ -12,10 +12,10 @@ For-patch: backup: vma: add dir format
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/blockdev.c b/blockdev.c
-index 5e1234b..9cf76f1 100644
+index dd4e4bd..bf61a74 100644
 --- a/blockdev.c
 +++ b/blockdev.c
-@@ -3260,7 +3260,7 @@ UuidInfo *qmp_backup(const char *backup_file, bool has_format,
+@@ -3374,7 +3374,7 @@ UuidInfo *qmp_backup(const char *backup_file, bool has_format,
              }
  
              di->target = bdrv_new();
diff --git a/debian/patches/pve/0035-blockdev-backup_start-now-takes-a-BlockJobTxn.patch b/debian/patches/pve/0035-blockdev-backup_start-now-takes-a-BlockJobTxn.patch
index c55a811..15e35d6 100644
--- a/debian/patches/pve/0035-blockdev-backup_start-now-takes-a-BlockJobTxn.patch
+++ b/debian/patches/pve/0035-blockdev-backup_start-now-takes-a-BlockJobTxn.patch
@@ -1,7 +1,7 @@
-From 825a46a3cfb266ebc12266555898ca3c27d4dda9 Mon Sep 17 00:00:00 2001
+From eb1226235b886a2e472ed78d5df38608eb537618 Mon Sep 17 00:00:00 2001
 From: Wolfgang Bumiller <w.bumiller at proxmox.com>
 Date: Thu, 10 Dec 2015 14:50:05 +0100
-Subject: [PATCH 35/41] blockdev: backup_start now takes a BlockJobTxn
+Subject: [PATCH 35/55] blockdev: backup_start now takes a BlockJobTxn
 
 As per commit 78f51fde88d1:
 block: Add BlockJobTxn support to backup_run
@@ -12,10 +12,10 @@ For-patch: backup: add pve monitor commands
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/blockdev.c b/blockdev.c
-index 9cf76f1..ac504a7 100644
+index bf61a74..96fc30b 100644
 --- a/blockdev.c
 +++ b/blockdev.c
-@@ -3323,7 +3323,7 @@ UuidInfo *qmp_backup(const char *backup_file, bool has_format,
+@@ -3437,7 +3437,7 @@ UuidInfo *qmp_backup(const char *backup_file, bool has_format,
          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,
diff --git a/debian/patches/pve/0036-savevm-async-migration-and-bdrv_open-update.patch b/debian/patches/pve/0036-savevm-async-migration-and-bdrv_open-update.patch
index 1161165..db2c4d8 100644
--- a/debian/patches/pve/0036-savevm-async-migration-and-bdrv_open-update.patch
+++ b/debian/patches/pve/0036-savevm-async-migration-and-bdrv_open-update.patch
@@ -1,7 +1,7 @@
-From 9e97dac64087b5aefe40b99ab0f21ae722d30034 Mon Sep 17 00:00:00 2001
+From 6517453d33b72863940749b1b4ee1b36b7acf24c Mon Sep 17 00:00:00 2001
 From: Wolfgang Bumiller <w.bumiller at proxmox.com>
 Date: Thu, 10 Dec 2015 15:14:00 +0100
-Subject: [PATCH 36/41] savevm-async: migration and bdrv_open update
+Subject: [PATCH 36/55] savevm-async: migration and bdrv_open update
 
 ---
  savevm-async.c | 25 ++++++++++++-------------
diff --git a/debian/patches/pve/0037-qapi-qmp_marshal_-renames-for-pve-monitor-commands.patch b/debian/patches/pve/0037-qapi-qmp_marshal_-renames-for-pve-monitor-commands.patch
index 5bdc0ff..d301246 100644
--- a/debian/patches/pve/0037-qapi-qmp_marshal_-renames-for-pve-monitor-commands.patch
+++ b/debian/patches/pve/0037-qapi-qmp_marshal_-renames-for-pve-monitor-commands.patch
@@ -1,7 +1,7 @@
-From 6c9fa84fe9a676616fc9bdbf148c255c79f37f99 Mon Sep 17 00:00:00 2001
+From 48d52946667b9814ff390405e649d8a8705ee584 Mon Sep 17 00:00:00 2001
 From: Wolfgang Bumiller <w.bumiller at proxmox.com>
 Date: Thu, 10 Dec 2015 15:19:42 +0100
-Subject: [PATCH 37/41] qapi: qmp_marshal_* renames for pve monitor commands
+Subject: [PATCH 37/55] qapi: qmp_marshal_* renames for pve monitor commands
 
 As per 7fad30f0:
 qapi: Rename qmp_marshal_input_FOO() to qmp_marshal_FOO()
@@ -12,10 +12,10 @@ For-patch: backup: add pve monitor commands
  1 file changed, 3 insertions(+), 3 deletions(-)
 
 diff --git a/qmp-commands.hx b/qmp-commands.hx
-index de07f54..478de38 100644
+index 964563e..0eebb75 100644
 --- a/qmp-commands.hx
 +++ b/qmp-commands.hx
-@@ -1256,19 +1256,19 @@ EQMP
+@@ -1281,19 +1281,19 @@ EQMP
      {
          .name       = "backup",
          .args_type  = "backup-file:s,format:s?,config-file:F?,firewall-file:F?,speed:o?,devlist:s?",
diff --git a/debian/patches/pve/0038-qapi-qmp_mashal_-renames-for-async-snapshot.patch b/debian/patches/pve/0038-qapi-qmp_mashal_-renames-for-async-snapshot.patch
index 99228aa..c87aa75 100644
--- a/debian/patches/pve/0038-qapi-qmp_mashal_-renames-for-async-snapshot.patch
+++ b/debian/patches/pve/0038-qapi-qmp_mashal_-renames-for-async-snapshot.patch
@@ -1,7 +1,7 @@
-From 610ba269757b48a75efce7a05cfd2bc4d9016da7 Mon Sep 17 00:00:00 2001
+From 6eeadc56b6dac81222e595fd4d95daac4cac3333 Mon Sep 17 00:00:00 2001
 From: Wolfgang Bumiller <w.bumiller at proxmox.com>
 Date: Thu, 10 Dec 2015 15:21:10 +0100
-Subject: [PATCH 38/41] qapi: qmp_mashal_* renames for async snapshot
+Subject: [PATCH 38/55] qapi: qmp_mashal_* renames for async snapshot
 
 As per 7fad30f0:
 qapi: Rename qmp_marshal_input_FOO() to qmp_marshal_FOO()
@@ -12,10 +12,10 @@ For-patch: internal snapshot async
  1 file changed, 5 insertions(+), 5 deletions(-)
 
 diff --git a/qmp-commands.hx b/qmp-commands.hx
-index 478de38..129e1b3 100644
+index 0eebb75..6abe9df 100644
 --- a/qmp-commands.hx
 +++ b/qmp-commands.hx
-@@ -4700,31 +4700,31 @@ EQMP
+@@ -4808,31 +4808,31 @@ EQMP
      {
          .name       = "savevm-start",
          .args_type  = "statefile:s?",
diff --git a/debian/patches/pve/0039-qapi-qmp_mashal_-renames-for-get_link_status.patch b/debian/patches/pve/0039-qapi-qmp_mashal_-renames-for-get_link_status.patch
index 97e1e9a..a59223c 100644
--- a/debian/patches/pve/0039-qapi-qmp_mashal_-renames-for-get_link_status.patch
+++ b/debian/patches/pve/0039-qapi-qmp_mashal_-renames-for-get_link_status.patch
@@ -1,7 +1,7 @@
-From 729410b4b0c9fc9a8d8462480ef580b5b97782d9 Mon Sep 17 00:00:00 2001
+From 0c87d830e293ad329e1ac175475cd149ce189177 Mon Sep 17 00:00:00 2001
 From: Wolfgang Bumiller <w.bumiller at proxmox.com>
 Date: Thu, 10 Dec 2015 15:21:59 +0100
-Subject: [PATCH 39/41] qapi: qmp_mashal_* renames for get_link_status
+Subject: [PATCH 39/55] qapi: qmp_mashal_* renames for get_link_status
 
 As per 7fad30f0:
 qapi: Rename qmp_marshal_input_FOO() to qmp_marshal_FOO()
@@ -12,10 +12,10 @@ For-patch: qmp: add get_link_status
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/qmp-commands.hx b/qmp-commands.hx
-index 129e1b3..12b884c 100644
+index 6abe9df..38ec312 100644
 --- a/qmp-commands.hx
 +++ b/qmp-commands.hx
-@@ -1773,7 +1773,7 @@ EQMP
+@@ -1846,7 +1846,7 @@ EQMP
      {
          .name       = "get_link_status",
          .args_type  = "name:s",
diff --git a/debian/patches/pve/0040-vnc-make-x509-imply-tls-again.patch b/debian/patches/pve/0040-vnc-make-x509-imply-tls-again.patch
index a8237ae..e90ff5b 100644
--- a/debian/patches/pve/0040-vnc-make-x509-imply-tls-again.patch
+++ b/debian/patches/pve/0040-vnc-make-x509-imply-tls-again.patch
@@ -1,17 +1,17 @@
-From b75743d1277b90c2248ce06c0ced957212531441 Mon Sep 17 00:00:00 2001
+From 6a839e5bfcd7e41815b3ba407361c8effd36b5a8 Mon Sep 17 00:00:00 2001
 From: Wolfgang Bumiller <w.bumiller at proxmox.com>
 Date: Tue, 12 Jan 2016 09:09:49 +0100
-Subject: [PATCH 40/41] vnc: make x509 imply tls again
+Subject: [PATCH 40/55] vnc: make x509 imply tls again
 
 ---
  ui/vnc.c | 5 ++---
  1 file changed, 2 insertions(+), 3 deletions(-)
 
 diff --git a/ui/vnc.c b/ui/vnc.c
-index ae5a4fe..ba99636 100644
+index 88a5824..4610ce8 100644
 --- a/ui/vnc.c
 +++ b/ui/vnc.c
-@@ -3732,9 +3732,8 @@ void vnc_display_open(const char *id, Error **errp)
+@@ -3671,9 +3671,8 @@ void vnc_display_open(const char *id, Error **errp)
          const char *path;
          bool tls = false, x509 = false, x509verify = false;
          tls  = qemu_opt_get_bool(opts, "tls", false);
diff --git a/debian/patches/pve/0041-PVE-VNC-authentication.patch b/debian/patches/pve/0041-PVE-VNC-authentication.patch
index 1bf8b46..1de06a4 100644
--- a/debian/patches/pve/0041-PVE-VNC-authentication.patch
+++ b/debian/patches/pve/0041-PVE-VNC-authentication.patch
@@ -1,7 +1,7 @@
-From 19a3e72ea86fb723d7facba1f07d7ae99520e461 Mon Sep 17 00:00:00 2001
+From 4f24f670a0bbbce29981d7ee54d31a960e00617c Mon Sep 17 00:00:00 2001
 From: Wolfgang Bumiller <w.bumiller at proxmox.com>
 Date: Mon, 11 Jan 2016 10:40:31 +0100
-Subject: [PATCH 41/54] PVE VNC authentication
+Subject: [PATCH 41/55] PVE VNC authentication
 
 ---
  crypto/tlscreds.c         |  47 +++++++++++
@@ -18,10 +18,10 @@ Subject: [PATCH 41/54] PVE VNC authentication
  11 files changed, 375 insertions(+), 40 deletions(-)
 
 diff --git a/crypto/tlscreds.c b/crypto/tlscreds.c
-index e7d9c1c..27e5c78 100644
+index 1620e12..affe020 100644
 --- a/crypto/tlscreds.c
 +++ b/crypto/tlscreds.c
-@@ -156,6 +156,33 @@ qcrypto_tls_creds_prop_get_verify(Object *obj,
+@@ -158,6 +158,33 @@ qcrypto_tls_creds_prop_get_verify(Object *obj,
  
  
  static void
@@ -96,10 +96,10 @@ index 9222be4..3a34279 100644
  
  #endif /* QCRYPTO_TLSCRED_PRIV_H__ */
 diff --git a/crypto/tlscredsx509.c b/crypto/tlscredsx509.c
-index 26f18cb..12e67c8 100644
+index 6a0179c..d8f3bf1 100644
 --- a/crypto/tlscredsx509.c
 +++ b/crypto/tlscredsx509.c
-@@ -547,22 +547,23 @@ qcrypto_tls_creds_x509_load(QCryptoTLSCredsX509 *creds,
+@@ -550,22 +550,23 @@ qcrypto_tls_creds_x509_load(QCryptoTLSCredsX509 *creds,
          *key = NULL, *dhparams = NULL;
      int ret;
      int rv = -1;
@@ -126,7 +126,7 @@ index 26f18cb..12e67c8 100644
                                         true, &key, errp) < 0 ||
              qcrypto_tls_creds_get_path(&creds->parent_obj,
                                         QCRYPTO_TLS_CREDS_DH_PARAMS,
-@@ -571,13 +572,13 @@ qcrypto_tls_creds_x509_load(QCryptoTLSCredsX509 *creds,
+@@ -574,13 +575,13 @@ qcrypto_tls_creds_x509_load(QCryptoTLSCredsX509 *creds,
          }
      } else {
          if (qcrypto_tls_creds_get_path(&creds->parent_obj,
@@ -144,7 +144,7 @@ index 26f18cb..12e67c8 100644
              goto cleanup;
          }
 diff --git a/crypto/tlssession.c b/crypto/tlssession.c
-index 3735529..a7ed50a 100644
+index a543e5a..564ad5d 100644
 --- a/crypto/tlssession.c
 +++ b/crypto/tlssession.c
 @@ -23,6 +23,7 @@
@@ -156,10 +156,10 @@ index 3735529..a7ed50a 100644
  #include "trace.h"
  
 diff --git a/include/crypto/tlscreds.h b/include/crypto/tlscreds.h
-index 21761b7..2cc0ce0 100644
+index 8e2babd..8969e66 100644
 --- a/include/crypto/tlscreds.h
 +++ b/include/crypto/tlscreds.h
-@@ -56,6 +56,7 @@ struct QCryptoTLSCreds {
+@@ -54,6 +54,7 @@ struct QCryptoTLSCreds {
      gnutls_dh_params_t dh_params;
  #endif
      bool verifyPeer;
@@ -168,10 +168,10 @@ index 21761b7..2cc0ce0 100644
  
  
 diff --git a/include/ui/console.h b/include/ui/console.h
-index c249db4..399b42d 100644
+index d5a88d9..c17bee0 100644
 --- a/include/ui/console.h
 +++ b/include/ui/console.h
-@@ -409,6 +409,7 @@ void sdl_display_init(DisplayState *ds, int full_screen, int no_frame);
+@@ -427,6 +427,7 @@ void sdl_display_init(DisplayState *ds, int full_screen, int no_frame);
  void cocoa_display_init(DisplayState *ds, int full_screen);
  
  /* vnc.c */
@@ -180,10 +180,10 @@ index c249db4..399b42d 100644
  void vnc_display_open(const char *id, Error **errp);
  void vnc_display_add_client(const char *id, int csock, bool skipauth);
 diff --git a/qemu-options.hx b/qemu-options.hx
-index cd465d5..bf87c00 100644
+index 20ab9ac..30b90f5 100644
 --- a/qemu-options.hx
 +++ b/qemu-options.hx
-@@ -419,6 +419,9 @@ STEXI
+@@ -476,6 +476,9 @@ STEXI
  @table @option
  ETEXI
  
@@ -194,7 +194,7 @@ index cd465d5..bf87c00 100644
      "-fda/-fdb file  use 'file' as floppy disk 0/1 image\n", QEMU_ARCH_ALL)
  DEF("fdb", HAS_ARG, QEMU_OPTION_fdb, "", QEMU_ARCH_ALL)
 diff --git a/ui/vnc-auth-vencrypt.c b/ui/vnc-auth-vencrypt.c
-index 44ac2fa..480a1ee 100644
+index 11c8c9a..d11f1df 100644
 --- a/ui/vnc-auth-vencrypt.c
 +++ b/ui/vnc-auth-vencrypt.c
 @@ -28,6 +28,107 @@
@@ -305,7 +305,7 @@ index 44ac2fa..480a1ee 100644
  
  static void start_auth_vencrypt_subauth(VncState *vs)
  {
-@@ -37,6 +138,17 @@ static void start_auth_vencrypt_subauth(VncState *vs)
+@@ -39,6 +140,17 @@ static void start_auth_vencrypt_subauth(VncState *vs)
         start_client_init(vs);
         break;
  
@@ -431,10 +431,10 @@ index 44ac2fa..480a1ee 100644
          vnc_read_when(vs, protocol_client_vencrypt_auth, 4);
      }
 diff --git a/ui/vnc.c b/ui/vnc.c
-index ba99636..612cab2 100644
+index 4610ce8..66e2163 100644
 --- a/ui/vnc.c
 +++ b/ui/vnc.c
-@@ -54,6 +54,125 @@ static const struct timeval VNC_REFRESH_LOSSY = { 2, 0 };
+@@ -55,6 +55,125 @@ static const struct timeval VNC_REFRESH_LOSSY = { 2, 0 };
  #include "vnc_keysym.h"
  #include "crypto/cipher.h"
  
@@ -560,7 +560,7 @@ index ba99636..612cab2 100644
  static QTAILQ_HEAD(, VncDisplay) vnc_displays =
      QTAILQ_HEAD_INITIALIZER(vnc_displays);
  
-@@ -3427,11 +3546,17 @@ vnc_display_setup_auth(VncDisplay *vs,
+@@ -3359,11 +3478,17 @@ vnc_display_setup_auth(VncDisplay *vs,
              if (object_dynamic_cast(OBJECT(vs->tlscreds),
                                      TYPE_QCRYPTO_TLS_CREDS_X509)) {
                  VNC_DEBUG("Initializing VNC server with x509 password auth\n");
@@ -580,7 +580,7 @@ index ba99636..612cab2 100644
              } else {
                  error_setg(errp,
                             "Unsupported TLS cred type %s",
-@@ -3522,6 +3647,7 @@ vnc_display_create_creds(bool x509,
+@@ -3454,6 +3579,7 @@ vnc_display_create_creds(bool x509,
                           bool x509verify,
                           const char *dir,
                           const char *id,
@@ -588,7 +588,7 @@ index ba99636..612cab2 100644
                           Error **errp)
  {
      gchar *credsid = g_strdup_printf("tlsvnc%s", id);
-@@ -3537,6 +3663,7 @@ vnc_display_create_creds(bool x509,
+@@ -3469,6 +3595,7 @@ vnc_display_create_creds(bool x509,
                                        "endpoint", "server",
                                        "dir", dir,
                                        "verify-peer", x509verify ? "yes" : "no",
@@ -596,7 +596,7 @@ index ba99636..612cab2 100644
                                        NULL);
      } else {
          creds = object_new_with_props(TYPE_QCRYPTO_TLS_CREDS_ANON,
-@@ -3544,6 +3671,7 @@ vnc_display_create_creds(bool x509,
+@@ -3476,6 +3603,7 @@ vnc_display_create_creds(bool x509,
                                        credsid,
                                        &err,
                                        "endpoint", "server",
@@ -604,7 +604,7 @@ index ba99636..612cab2 100644
                                        NULL);
      }
  
-@@ -3730,12 +3858,17 @@ void vnc_display_open(const char *id, Error **errp)
+@@ -3669,12 +3797,17 @@ void vnc_display_open(const char *id, Error **errp)
          }
      } else {
          const char *path;
@@ -623,7 +623,7 @@ index ba99636..612cab2 100644
              } else {
                  path = qemu_opt_get(opts, "x509verify");
                  if (path) {
-@@ -3747,6 +3880,7 @@ void vnc_display_open(const char *id, Error **errp)
+@@ -3686,6 +3819,7 @@ void vnc_display_open(const char *id, Error **errp)
                                                      x509verify,
                                                      path,
                                                      vs->id,
@@ -632,10 +632,10 @@ index ba99636..612cab2 100644
              if (!vs->tlscreds) {
                  goto fail;
 diff --git a/ui/vnc.h b/ui/vnc.h
-index 2863f58..1c4fee2 100644
+index 81a3261..40e2780 100644
 --- a/ui/vnc.h
 +++ b/ui/vnc.h
-@@ -275,6 +275,8 @@ struct VncState
+@@ -281,6 +281,8 @@ struct VncState
      int auth;
      int subauth; /* Used by VeNCrypt */
      char challenge[VNC_AUTH_CHALLENGE_SIZE];
@@ -644,7 +644,7 @@ index 2863f58..1c4fee2 100644
      QCryptoTLSSession *tls; /* Borrowed pointer from channel, don't free */
  #ifdef CONFIG_VNC_SASL
      VncStateSASL sasl;
-@@ -578,4 +580,6 @@ int vnc_zrle_send_framebuffer_update(VncState *vs, int x, int y, int w, int h);
+@@ -576,4 +578,6 @@ int vnc_zrle_send_framebuffer_update(VncState *vs, int x, int y, int w, int h);
  int vnc_zywrle_send_framebuffer_update(VncState *vs, int x, int y, int w, int h);
  void vnc_zrle_clear(VncState *vs);
  
@@ -652,10 +652,10 @@ index 2863f58..1c4fee2 100644
 +
  #endif /* __QEMU_VNC_H */
 diff --git a/vl.c b/vl.c
-index 63c6798..e8034b0 100644
+index f393767..f5fc86f 100644
 --- a/vl.c
 +++ b/vl.c
-@@ -2973,6 +2973,7 @@ static void set_memory_options(uint64_t *ram_slots, ram_addr_t *maxram_size,
+@@ -2967,6 +2967,7 @@ static void set_memory_options(uint64_t *ram_slots, ram_addr_t *maxram_size,
  int main(int argc, char **argv, char **envp)
  {
      int i;
@@ -663,7 +663,7 @@ index 63c6798..e8034b0 100644
      int snapshot, linux_boot;
      const char *initrd_filename;
      const char *kernel_filename, *kernel_cmdline;
-@@ -3736,6 +3737,14 @@ int main(int argc, char **argv, char **envp)
+@@ -3737,6 +3738,14 @@ int main(int argc, char **argv, char **envp)
                      exit(1);
                  }
                  break;
diff --git a/debian/patches/pve/0042-vma-writer-don-t-bail-out-on-zero-length-files.patch b/debian/patches/pve/0042-vma-writer-don-t-bail-out-on-zero-length-files.patch
index 5289a8a..954d5b8 100644
--- a/debian/patches/pve/0042-vma-writer-don-t-bail-out-on-zero-length-files.patch
+++ b/debian/patches/pve/0042-vma-writer-don-t-bail-out-on-zero-length-files.patch
@@ -1,7 +1,7 @@
-From 7844d4dd830c71ecfd437556251ecef96352e1e7 Mon Sep 17 00:00:00 2001
+From f8d5f70f8dbe379e442b182c89df168e38ba999d Mon Sep 17 00:00:00 2001
 From: Wolfgang Bumiller <w.bumiller at proxmox.com>
 Date: Mon, 8 Feb 2016 08:23:34 +0100
-Subject: [PATCH 42/44] vma-writer: don't bail out on zero-length files
+Subject: [PATCH 42/55] vma-writer: don't bail out on zero-length files
 
 ---
  vma-writer.c | 1 -
diff --git a/debian/patches/pve/0043-vma-better-driver-guessing-for-bdrv_open.patch b/debian/patches/pve/0043-vma-better-driver-guessing-for-bdrv_open.patch
index 50b1d44..bdf4a28 100644
--- a/debian/patches/pve/0043-vma-better-driver-guessing-for-bdrv_open.patch
+++ b/debian/patches/pve/0043-vma-better-driver-guessing-for-bdrv_open.patch
@@ -1,7 +1,7 @@
-From 97fe08940a43098fb033950ea8c46716a7476439 Mon Sep 17 00:00:00 2001
+From d0cbfa6899c33f2a93696666b03d9a343eb81d15 Mon Sep 17 00:00:00 2001
 From: Wolfgang Bumiller <w.bumiller at proxmox.com>
 Date: Tue, 23 Feb 2016 15:48:41 +0100
-Subject: [PATCH] vma: better driver guessing for bdrv_open
+Subject: [PATCH 43/55] vma: better driver guessing for bdrv_open
 
 Only use 'raw' when the file actually ends with .raw and
 no protocol has been specified. With protocol pass the
diff --git a/debian/patches/pve/0044-block-add-the-zeroinit-block-driver-filter.patch b/debian/patches/pve/0044-block-add-the-zeroinit-block-driver-filter.patch
new file mode 100644
index 0000000..ca588f7
--- /dev/null
+++ b/debian/patches/pve/0044-block-add-the-zeroinit-block-driver-filter.patch
@@ -0,0 +1,248 @@
+From b3bf300710e38fd4692f0d761c75f4ba3a7edd7e Mon Sep 17 00:00:00 2001
+From: Wolfgang Bumiller <w.bumiller at proxmox.com>
+Date: Thu, 17 Mar 2016 11:33:37 +0100
+Subject: [PATCH 44/55] block: add the zeroinit block driver filter
+
+---
+ block/Makefile.objs |   1 +
+ block/zeroinit.c    | 216 ++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 217 insertions(+)
+ create mode 100644 block/zeroinit.c
+
+diff --git a/block/Makefile.objs b/block/Makefile.objs
+index 44a5416..9e2cdbc 100644
+--- a/block/Makefile.objs
++++ b/block/Makefile.objs
+@@ -4,6 +4,7 @@ block-obj-y += qed.o qed-gencb.o qed-l2-cache.o qed-table.o qed-cluster.o
+ block-obj-y += qed-check.o
+ block-obj-$(CONFIG_VHDX) += vhdx.o vhdx-endian.o vhdx-log.o
+ block-obj-y += quorum.o
++block-obj-y += zeroinit.o
+ block-obj-y += parallels.o blkdebug.o blkverify.o blkreplay.o
+ block-obj-y += block-backend.o snapshot.o qapi.o
+ block-obj-$(CONFIG_WIN32) += raw-win32.o win32-aio.o
+diff --git a/block/zeroinit.c b/block/zeroinit.c
+new file mode 100644
+index 0000000..04a9bd0
+--- /dev/null
++++ b/block/zeroinit.c
+@@ -0,0 +1,216 @@
++/*
++ * Filter to fake a zero-initialized block device.
++ *
++ * Copyright (c) 2016 Wolfgang Bumiller <w.bumiller at proxmox.com>
++ * Copyright (c) 2016 Proxmox Server Solutions GmbH
++ *
++ * This work is licensed under the terms of the GNU GPL, version 2 or later.
++ * See the COPYING file in the top-level directory.
++ */
++
++#include "block/block_int.h"
++#include "qapi/qmp/qdict.h"
++#include "qapi/qmp/qstring.h"
++
++typedef struct {
++    bool has_zero_init;
++    int64_t extents;
++} BDRVZeroinitState;
++
++/* Valid blkverify filenames look like blkverify:path/to/raw_image:path/to/image */
++static void zeroinit_parse_filename(const char *filename, QDict *options,
++                                     Error **errp)
++{
++    QString *raw_path;
++
++    /* Parse the blkverify: prefix */
++    if (!strstart(filename, "zeroinit:", &filename)) {
++        /* There was no prefix; therefore, all options have to be already
++           present in the QDict (except for the filename) */
++        return;
++    }
++
++    raw_path = qstring_from_str(filename);
++    qdict_put(options, "x-next", raw_path);
++}
++
++static QemuOptsList runtime_opts = {
++    .name = "zeroinit",
++    .head = QTAILQ_HEAD_INITIALIZER(runtime_opts.head),
++    .desc = {
++        {
++            .name = "x-next",
++            .type = QEMU_OPT_STRING,
++            .help = "[internal use only, will be removed]",
++        },
++        {
++            .name = "x-zeroinit",
++            .type = QEMU_OPT_BOOL,
++            .help = "set has_initialized_zero flag",
++        },
++        { /* end of list */ }
++    },
++};
++
++static int zeroinit_open(BlockDriverState *bs, QDict *options, int flags,
++                          Error **errp)
++{
++    BDRVZeroinitState *s = bs->opaque;
++    QemuOpts *opts;
++    Error *local_err = NULL;
++    int ret;
++
++    s->extents = 0;
++
++    opts = qemu_opts_create(&runtime_opts, NULL, 0, &error_abort);
++    qemu_opts_absorb_qdict(opts, options, &local_err);
++    if (local_err) {
++        error_propagate(errp, local_err);
++        ret = -EINVAL;
++        goto fail;
++    }
++
++    /* Open the raw file */
++    bs->file = bdrv_open_child(qemu_opt_get(opts, "x-next"), options, "next",
++                               bs, &child_file, false, &local_err);
++    if (local_err) {
++        ret = -EINVAL;
++        error_propagate(errp, local_err);
++        goto fail;
++    }
++
++    /* set the options */
++    s->has_zero_init = qemu_opt_get_bool(opts, "x-zeroinit", true);
++
++    ret = 0;
++fail:
++    if (ret < 0) {
++        bdrv_unref_child(bs, bs->file);
++    }
++    qemu_opts_del(opts);
++    return ret;
++}
++
++static void zeroinit_close(BlockDriverState *bs)
++{
++    BDRVZeroinitState *s = bs->opaque;
++    (void)s;
++}
++
++static int64_t zeroinit_getlength(BlockDriverState *bs)
++{
++    return bdrv_getlength(bs->file->bs);
++}
++
++static BlockAIOCB *zeroinit_aio_readv(BlockDriverState *bs,
++        int64_t sector_num, QEMUIOVector *qiov, int nb_sectors,
++        BlockCompletionFunc *cb, void *opaque)
++{
++    return bdrv_aio_readv(bs->file->bs, sector_num, qiov, nb_sectors,
++                          cb, opaque);
++}
++
++static int coroutine_fn zeroinit_co_write_zeroes(BlockDriverState *bs, int64_t sector_num,
++                                                 int nb_sectors, BdrvRequestFlags flags)
++{
++    BDRVZeroinitState *s = bs->opaque;
++    if (sector_num >= s->extents)
++        return 0;
++    return bdrv_write_zeroes(bs->file->bs, sector_num, nb_sectors, flags);
++}
++
++static BlockAIOCB *zeroinit_aio_writev(BlockDriverState *bs,
++        int64_t sector_num, QEMUIOVector *qiov, int nb_sectors,
++        BlockCompletionFunc *cb, void *opaque)
++{
++    BDRVZeroinitState *s = bs->opaque;
++    int64_t extents = sector_num + nb_sectors + 1;
++    if (extents > s->extents)
++        s->extents = extents;
++    return bdrv_aio_writev(bs->file->bs, sector_num, qiov, nb_sectors,
++                           cb, opaque);
++}
++
++static BlockAIOCB *zeroinit_aio_flush(BlockDriverState *bs,
++                                       BlockCompletionFunc *cb,
++                                       void *opaque)
++{
++    return bdrv_aio_flush(bs->file->bs, cb, opaque);
++}
++
++static bool zeroinit_recurse_is_first_non_filter(BlockDriverState *bs,
++                                                  BlockDriverState *candidate)
++{
++    return bdrv_recurse_is_first_non_filter(bs->file->bs, candidate);
++}
++
++static coroutine_fn int zeroinit_co_flush(BlockDriverState *bs)
++{
++    return bdrv_co_flush(bs->file->bs);
++}
++
++static int zeroinit_has_zero_init(BlockDriverState *bs)
++{
++    BDRVZeroinitState *s = bs->opaque;
++    return s->has_zero_init;
++}
++
++static int64_t coroutine_fn zeroinit_co_get_block_status(BlockDriverState *bs,
++                                                         int64_t sector_num,
++                                                         int nb_sectors, int *pnum)
++{
++    return bdrv_get_block_status(bs->file->bs, sector_num, nb_sectors, pnum);
++}
++
++static coroutine_fn BlockAIOCB *zeroinit_aio_discard(BlockDriverState *bs,
++                                                     int64_t sector_num, int nb_sectors,
++                                                     BlockCompletionFunc *cb, void *opaque)
++{
++    return bdrv_aio_discard(bs->file->bs, sector_num, nb_sectors, cb, opaque);
++}
++
++static int zeroinit_truncate(BlockDriverState *bs, int64_t offset)
++{
++    return bdrv_truncate(bs->file->bs, offset);
++}
++
++static int zeroinit_get_info(BlockDriverState *bs, BlockDriverInfo *bdi)
++{
++    return bdrv_get_info(bs->file->bs, bdi);
++}
++
++static BlockDriver bdrv_zeroinit = {
++    .format_name                      = "zeroinit",
++    .protocol_name                    = "zeroinit",
++    .instance_size                    = sizeof(BDRVZeroinitState),
++
++    .bdrv_parse_filename              = zeroinit_parse_filename,
++    .bdrv_file_open                   = zeroinit_open,
++    .bdrv_close                       = zeroinit_close,
++    .bdrv_getlength                   = zeroinit_getlength,
++    .bdrv_co_flush_to_disk            = zeroinit_co_flush,
++
++    .bdrv_co_write_zeroes             = zeroinit_co_write_zeroes,
++    .bdrv_aio_writev                  = zeroinit_aio_writev,
++    .bdrv_aio_readv                   = zeroinit_aio_readv,
++    .bdrv_aio_flush                   = zeroinit_aio_flush,
++
++    .is_filter                        = true,
++    .bdrv_recurse_is_first_non_filter = zeroinit_recurse_is_first_non_filter,
++
++    .bdrv_has_zero_init = zeroinit_has_zero_init,
++
++    .bdrv_co_get_block_status = zeroinit_co_get_block_status,
++
++    .bdrv_aio_discard = zeroinit_aio_discard,
++
++    .bdrv_truncate = zeroinit_truncate,
++    .bdrv_get_info = zeroinit_get_info,
++};
++
++static void bdrv_zeroinit_init(void)
++{
++    bdrv_register(&bdrv_zeroinit);
++}
++
++block_init(bdrv_zeroinit_init);
+-- 
+2.1.4
+
diff --git a/debian/patches/pve/0044-block-add-zeroinit.patch b/debian/patches/pve/0044-block-add-zeroinit.patch
deleted file mode 100644
index f7e085a..0000000
--- a/debian/patches/pve/0044-block-add-zeroinit.patch
+++ /dev/null
@@ -1,248 +0,0 @@
-From 8b996ca2740d40027652ea63f52bed8f9271331b Mon Sep 17 00:00:00 2001
-From: Wolfgang Bumiller <w.bumiller at proxmox.com>
-Date: Thu, 17 Mar 2016 11:33:37 +0100
-Subject: [PATCH] block: add the zeroinit block driver filter
-
----
- block/Makefile.objs |   1 +
- block/zeroinit.c    | 216 ++++++++++++++++++++++++++++++++++++++++++++++++++++
- 2 files changed, 217 insertions(+)
- create mode 100644 block/zeroinit.c
-
-diff --git a/block/Makefile.objs b/block/Makefile.objs
-index 58ef2ef..5bb55b0 100644
---- a/block/Makefile.objs
-+++ b/block/Makefile.objs
-@@ -4,6 +4,7 @@ block-obj-y += qed.o qed-gencb.o qed-l2-cache.o qed-table.o qed-cluster.o
- block-obj-y += qed-check.o
- block-obj-$(CONFIG_VHDX) += vhdx.o vhdx-endian.o vhdx-log.o
- block-obj-y += quorum.o
-+block-obj-y += zeroinit.o
- block-obj-y += parallels.o blkdebug.o blkverify.o blkreplay.o
- block-obj-y += block-backend.o snapshot.o qapi.o
- block-obj-$(CONFIG_WIN32) += raw-win32.o win32-aio.o
-diff --git a/block/zeroinit.c b/block/zeroinit.c
-new file mode 100644
-index 0000000..04a9bd0
---- /dev/null
-+++ b/block/zeroinit.c
-@@ -0,0 +1,216 @@
-+/*
-+ * Filter to fake a zero-initialized block device.
-+ *
-+ * Copyright (c) 2016 Wolfgang Bumiller <w.bumiller at proxmox.com>
-+ * Copyright (c) 2016 Proxmox Server Solutions GmbH
-+ *
-+ * This work is licensed under the terms of the GNU GPL, version 2 or later.
-+ * See the COPYING file in the top-level directory.
-+ */
-+
-+#include "block/block_int.h"
-+#include "qapi/qmp/qdict.h"
-+#include "qapi/qmp/qstring.h"
-+
-+typedef struct {
-+    bool has_zero_init;
-+    int64_t extents;
-+} BDRVZeroinitState;
-+
-+/* Valid blkverify filenames look like blkverify:path/to/raw_image:path/to/image */
-+static void zeroinit_parse_filename(const char *filename, QDict *options,
-+                                     Error **errp)
-+{
-+    QString *raw_path;
-+
-+    /* Parse the blkverify: prefix */
-+    if (!strstart(filename, "zeroinit:", &filename)) {
-+        /* There was no prefix; therefore, all options have to be already
-+           present in the QDict (except for the filename) */
-+        return;
-+    }
-+
-+    raw_path = qstring_from_str(filename);
-+    qdict_put(options, "x-next", raw_path);
-+}
-+
-+static QemuOptsList runtime_opts = {
-+    .name = "zeroinit",
-+    .head = QTAILQ_HEAD_INITIALIZER(runtime_opts.head),
-+    .desc = {
-+        {
-+            .name = "x-next",
-+            .type = QEMU_OPT_STRING,
-+            .help = "[internal use only, will be removed]",
-+        },
-+        {
-+            .name = "x-zeroinit",
-+            .type = QEMU_OPT_BOOL,
-+            .help = "set has_initialized_zero flag",
-+        },
-+        { /* end of list */ }
-+    },
-+};
-+
-+static int zeroinit_open(BlockDriverState *bs, QDict *options, int flags,
-+                          Error **errp)
-+{
-+    BDRVZeroinitState *s = bs->opaque;
-+    QemuOpts *opts;
-+    Error *local_err = NULL;
-+    int ret;
-+
-+    s->extents = 0;
-+
-+    opts = qemu_opts_create(&runtime_opts, NULL, 0, &error_abort);
-+    qemu_opts_absorb_qdict(opts, options, &local_err);
-+    if (local_err) {
-+        error_propagate(errp, local_err);
-+        ret = -EINVAL;
-+        goto fail;
-+    }
-+
-+    /* Open the raw file */
-+    bs->file = bdrv_open_child(qemu_opt_get(opts, "x-next"), options, "next",
-+                               bs, &child_file, false, &local_err);
-+    if (local_err) {
-+        ret = -EINVAL;
-+        error_propagate(errp, local_err);
-+        goto fail;
-+    }
-+
-+    /* set the options */
-+    s->has_zero_init = qemu_opt_get_bool(opts, "x-zeroinit", true);
-+
-+    ret = 0;
-+fail:
-+    if (ret < 0) {
-+        bdrv_unref_child(bs, bs->file);
-+    }
-+    qemu_opts_del(opts);
-+    return ret;
-+}
-+
-+static void zeroinit_close(BlockDriverState *bs)
-+{
-+    BDRVZeroinitState *s = bs->opaque;
-+    (void)s;
-+}
-+
-+static int64_t zeroinit_getlength(BlockDriverState *bs)
-+{
-+    return bdrv_getlength(bs->file->bs);
-+}
-+
-+static BlockAIOCB *zeroinit_aio_readv(BlockDriverState *bs,
-+        int64_t sector_num, QEMUIOVector *qiov, int nb_sectors,
-+        BlockCompletionFunc *cb, void *opaque)
-+{
-+    return bdrv_aio_readv(bs->file->bs, sector_num, qiov, nb_sectors,
-+                          cb, opaque);
-+}
-+
-+static int coroutine_fn zeroinit_co_write_zeroes(BlockDriverState *bs, int64_t sector_num,
-+                                                 int nb_sectors, BdrvRequestFlags flags)
-+{
-+    BDRVZeroinitState *s = bs->opaque;
-+    if (sector_num >= s->extents)
-+        return 0;
-+    return bdrv_write_zeroes(bs->file->bs, sector_num, nb_sectors, flags);
-+}
-+
-+static BlockAIOCB *zeroinit_aio_writev(BlockDriverState *bs,
-+        int64_t sector_num, QEMUIOVector *qiov, int nb_sectors,
-+        BlockCompletionFunc *cb, void *opaque)
-+{
-+    BDRVZeroinitState *s = bs->opaque;
-+    int64_t extents = sector_num + nb_sectors + 1;
-+    if (extents > s->extents)
-+        s->extents = extents;
-+    return bdrv_aio_writev(bs->file->bs, sector_num, qiov, nb_sectors,
-+                           cb, opaque);
-+}
-+
-+static BlockAIOCB *zeroinit_aio_flush(BlockDriverState *bs,
-+                                       BlockCompletionFunc *cb,
-+                                       void *opaque)
-+{
-+    return bdrv_aio_flush(bs->file->bs, cb, opaque);
-+}
-+
-+static bool zeroinit_recurse_is_first_non_filter(BlockDriverState *bs,
-+                                                  BlockDriverState *candidate)
-+{
-+    return bdrv_recurse_is_first_non_filter(bs->file->bs, candidate);
-+}
-+
-+static coroutine_fn int zeroinit_co_flush(BlockDriverState *bs)
-+{
-+    return bdrv_co_flush(bs->file->bs);
-+}
-+
-+static int zeroinit_has_zero_init(BlockDriverState *bs)
-+{
-+    BDRVZeroinitState *s = bs->opaque;
-+    return s->has_zero_init;
-+}
-+
-+static int64_t coroutine_fn zeroinit_co_get_block_status(BlockDriverState *bs,
-+                                                         int64_t sector_num,
-+                                                         int nb_sectors, int *pnum)
-+{
-+    return bdrv_get_block_status(bs->file->bs, sector_num, nb_sectors, pnum);
-+}
-+
-+static coroutine_fn BlockAIOCB *zeroinit_aio_discard(BlockDriverState *bs,
-+                                                     int64_t sector_num, int nb_sectors,
-+                                                     BlockCompletionFunc *cb, void *opaque)
-+{
-+    return bdrv_aio_discard(bs->file->bs, sector_num, nb_sectors, cb, opaque);
-+}
-+
-+static int zeroinit_truncate(BlockDriverState *bs, int64_t offset)
-+{
-+    return bdrv_truncate(bs->file->bs, offset);
-+}
-+
-+static int zeroinit_get_info(BlockDriverState *bs, BlockDriverInfo *bdi)
-+{
-+    return bdrv_get_info(bs->file->bs, bdi);
-+}
-+
-+static BlockDriver bdrv_zeroinit = {
-+    .format_name                      = "zeroinit",
-+    .protocol_name                    = "zeroinit",
-+    .instance_size                    = sizeof(BDRVZeroinitState),
-+
-+    .bdrv_parse_filename              = zeroinit_parse_filename,
-+    .bdrv_file_open                   = zeroinit_open,
-+    .bdrv_close                       = zeroinit_close,
-+    .bdrv_getlength                   = zeroinit_getlength,
-+    .bdrv_co_flush_to_disk            = zeroinit_co_flush,
-+
-+    .bdrv_co_write_zeroes             = zeroinit_co_write_zeroes,
-+    .bdrv_aio_writev                  = zeroinit_aio_writev,
-+    .bdrv_aio_readv                   = zeroinit_aio_readv,
-+    .bdrv_aio_flush                   = zeroinit_aio_flush,
-+
-+    .is_filter                        = true,
-+    .bdrv_recurse_is_first_non_filter = zeroinit_recurse_is_first_non_filter,
-+
-+    .bdrv_has_zero_init = zeroinit_has_zero_init,
-+
-+    .bdrv_co_get_block_status = zeroinit_co_get_block_status,
-+
-+    .bdrv_aio_discard = zeroinit_aio_discard,
-+
-+    .bdrv_truncate = zeroinit_truncate,
-+    .bdrv_get_info = zeroinit_get_info,
-+};
-+
-+static void bdrv_zeroinit_init(void)
-+{
-+    bdrv_register(&bdrv_zeroinit);
-+}
-+
-+block_init(bdrv_zeroinit_init);
--- 
-2.1.4
-
diff --git a/debian/patches/pve/0045-vma-add-format-option-to-device-mapping.patch b/debian/patches/pve/0045-vma-add-format-option-to-device-mapping.patch
index 14017db..a87569d 100644
--- a/debian/patches/pve/0045-vma-add-format-option-to-device-mapping.patch
+++ b/debian/patches/pve/0045-vma-add-format-option-to-device-mapping.patch
@@ -1,7 +1,7 @@
-From 65a0ff1802f7cc0b69b2c2121f45089efbb27ee4 Mon Sep 17 00:00:00 2001
+From 52002e4bb7572662d937de2c20b2110309095f29 Mon Sep 17 00:00:00 2001
 From: Wolfgang Bumiller <w.bumiller at proxmox.com>
 Date: Tue, 12 Apr 2016 13:49:44 +0200
-Subject: [PATCH 2/3] vma: add format option to device mapping
+Subject: [PATCH 45/55] vma: add format option to device mapping
 
 The BDRV_O_PROTOCOL option breaks non-raw protocol devices,
 so we instead now allow the format to be explicitly
diff --git a/debian/patches/pve/0046-pve-cleanup-includes-all-over-the-place.patch b/debian/patches/pve/0046-pve-cleanup-includes-all-over-the-place.patch
index 4b50936..b209b2b 100644
--- a/debian/patches/pve/0046-pve-cleanup-includes-all-over-the-place.patch
+++ b/debian/patches/pve/0046-pve-cleanup-includes-all-over-the-place.patch
@@ -1,7 +1,7 @@
-From c54b002d8148671f756ce813be7d37e62132bd7e Mon Sep 17 00:00:00 2001
+From 17751f15c2d15782ee24ddcfe991de940dbdc3b0 Mon Sep 17 00:00:00 2001
 From: Thomas Lamprecht <t.lamprecht at proxmox.com>
 Date: Wed, 6 Apr 2016 13:28:16 +0200
-Subject: [PATCH 46/52] pve: cleanup includes all over the place
+Subject: [PATCH 46/55] pve: cleanup includes all over the place
 
 QEMU wants to get a cleaner include system, adapt to it.
 ---
diff --git a/debian/patches/pve/0047-zeroinit-bdrv_get_block_status-got-a-new-param.patch b/debian/patches/pve/0047-zeroinit-bdrv_get_block_status-got-a-new-param.patch
index 1d46d93..bf0ba7a 100644
--- a/debian/patches/pve/0047-zeroinit-bdrv_get_block_status-got-a-new-param.patch
+++ b/debian/patches/pve/0047-zeroinit-bdrv_get_block_status-got-a-new-param.patch
@@ -1,7 +1,7 @@
-From e6be17e4378f4aa0860baa316ff90e10d0b70a68 Mon Sep 17 00:00:00 2001
+From e698a23ad095fcaf0d72734a480d5bc0202a6f75 Mon Sep 17 00:00:00 2001
 From: Thomas Lamprecht <t.lamprecht at proxmox.com>
 Date: Wed, 6 Apr 2016 14:15:58 +0200
-Subject: [PATCH 47/52] zeroinit: bdrv_get_block_status got a new param
+Subject: [PATCH 47/55] zeroinit: bdrv_get_block_status got a new param
 
 see: 67a0fd2a9bca204d2b39f910a97c7137636a0715
 ---
diff --git a/debian/patches/pve/0048-BDRV_O_CACHE_WB-was-removed.patch b/debian/patches/pve/0048-BDRV_O_CACHE_WB-was-removed.patch
index 047c203..ca9d4e8 100644
--- a/debian/patches/pve/0048-BDRV_O_CACHE_WB-was-removed.patch
+++ b/debian/patches/pve/0048-BDRV_O_CACHE_WB-was-removed.patch
@@ -1,7 +1,7 @@
-From 0bc6e4793ea10faf24f86ab92c2239d9c9b15b08 Mon Sep 17 00:00:00 2001
+From 9d30e60ad2a6a450c282c6f2df4432d8b9d84b05 Mon Sep 17 00:00:00 2001
 From: Thomas Lamprecht <t.lamprecht at proxmox.com>
 Date: Wed, 6 Apr 2016 14:24:28 +0200
-Subject: [PATCH 48/52] BDRV_O_CACHE_WB was removed
+Subject: [PATCH 48/55] BDRV_O_CACHE_WB was removed
 
 see: 61de4c680846167e01d7ba42bf787f8d1d80bf5e
 ---
@@ -11,10 +11,10 @@ see: 61de4c680846167e01d7ba42bf787f8d1d80bf5e
  3 files changed, 5 insertions(+), 5 deletions(-)
 
 diff --git a/blockdev.c b/blockdev.c
-index 24e0ed5..7c8d212 100644
+index 96fc30b..9330836 100644
 --- a/blockdev.c
 +++ b/blockdev.c
-@@ -3362,7 +3362,7 @@ UuidInfo *qmp_backup(const char *backup_file, bool has_format,
+@@ -3365,7 +3365,7 @@ UuidInfo *qmp_backup(const char *backup_file, bool has_format,
              const char *devname = bdrv_get_device_name(di->bs);
              snprintf(di->targetfile, PATH_MAX, "%s/%s.raw", backup_dir, devname);
  
@@ -32,7 +32,7 @@ index 4d73e66..2c41b17 100644
      Error *local_err = NULL;
  
 -    int bdrv_oflags = BDRV_O_CACHE_WB | BDRV_O_RDWR;
-+    int bdrv_oflags = BDRV_O_RDWR | BDRV_O_NO_FLUSH;
++    int bdrv_oflags = BDRV_O_RDWR;
      int ret;
  
      if (snap_state.state != SAVE_STATE_DONE) {
@@ -54,7 +54,7 @@ index c3db633..c1407d3 100644
              char *devfn = NULL;
              const char *format = NULL;
 -            int flags = BDRV_O_RDWR|BDRV_O_CACHE_WB;
-+            int flags = BDRV_O_RDWR|BDRV_O_NO_FLUSH;
++            int flags = BDRV_O_RDWR;
              bool write_zero = true;
  
              if (readmap) {
diff --git a/debian/patches/pve/0049-backup-bdrv_set_enable_write_cache-is-no-more.patch b/debian/patches/pve/0049-backup-bdrv_set_enable_write_cache-is-no-more.patch
index 191eb34..74771aa 100644
--- a/debian/patches/pve/0049-backup-bdrv_set_enable_write_cache-is-no-more.patch
+++ b/debian/patches/pve/0049-backup-bdrv_set_enable_write_cache-is-no-more.patch
@@ -1,7 +1,7 @@
-From a639701d3f528aea313d0062b9ae863f2660f546 Mon Sep 17 00:00:00 2001
+From b194d9117c084d148a3e4fee5c2b113faf799968 Mon Sep 17 00:00:00 2001
 From: Thomas Lamprecht <t.lamprecht at proxmox.com>
 Date: Wed, 6 Apr 2016 16:43:38 +0200
-Subject: [PATCH 49/52] backup: bdrv_set_enable_write_cache is no more
+Subject: [PATCH 49/55] backup: bdrv_set_enable_write_cache is no more
 
 see: 09cf9db1bcd60d9889b774925ba7058286d35412
 
@@ -11,7 +11,7 @@ this reverts a hunk of our commit: backup: modify job api
  1 file changed, 3 insertions(+), 6 deletions(-)
 
 diff --git a/block/backup.c b/block/backup.c
-index 8801b47..8baaf36 100644
+index c38b520..f0e647d 100644
 --- a/block/backup.c
 +++ b/block/backup.c
 @@ -414,12 +414,9 @@ static void coroutine_fn backup_run(void *opaque)
diff --git a/debian/patches/pve/0050-fix-possible-unitialised-return-value.patch b/debian/patches/pve/0050-fix-possible-unitialised-return-value.patch
index 6e806d1..353b739 100644
--- a/debian/patches/pve/0050-fix-possible-unitialised-return-value.patch
+++ b/debian/patches/pve/0050-fix-possible-unitialised-return-value.patch
@@ -1,14 +1,14 @@
-From 407b9a72c0dd952476bb77c0d133b83c3dfcfb15 Mon Sep 17 00:00:00 2001
+From 9be0512acac31822307c8ff8bc336fee659eeeb0 Mon Sep 17 00:00:00 2001
 From: Thomas Lamprecht <t.lamprecht at proxmox.com>
 Date: Wed, 6 Apr 2016 16:45:15 +0200
-Subject: [PATCH 50/52] fix possible unitialised return value
+Subject: [PATCH 50/55] fix possible unitialised return value
 
 ---
  migration/savevm.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/migration/savevm.c b/migration/savevm.c
-index 959944d..a797d96 100644
+index d6560f5..7b2d654 100644
 --- a/migration/savevm.c
 +++ b/migration/savevm.c
 @@ -1037,7 +1037,7 @@ int qemu_savevm_state_complete_precopy(QEMUFile *f, bool iterable_only)
diff --git a/debian/patches/pve/0051-net-NET_CLIENT_OPTIONS_KIND_MAX-changed.patch b/debian/patches/pve/0051-net-NET_CLIENT_OPTIONS_KIND_MAX-changed.patch
index a1e5410..2553ee9 100644
--- a/debian/patches/pve/0051-net-NET_CLIENT_OPTIONS_KIND_MAX-changed.patch
+++ b/debian/patches/pve/0051-net-NET_CLIENT_OPTIONS_KIND_MAX-changed.patch
@@ -1,7 +1,7 @@
-From 3019628843fecf84f01353f26b618cf74e23b93b Mon Sep 17 00:00:00 2001
+From 23a15e3819093d32fbf15709bbe1fe9e3869b171 Mon Sep 17 00:00:00 2001
 From: Thomas Lamprecht <t.lamprecht at proxmox.com>
 Date: Wed, 6 Apr 2016 16:46:11 +0200
-Subject: [PATCH 51/52] net: NET_CLIENT_OPTIONS_KIND_MAX changed
+Subject: [PATCH 51/55] net: NET_CLIENT_OPTIONS_KIND_MAX changed
 
 s/NET_CLIENT_OPTIONS_KIND_MAX/NET_CLIENT_OPTIONS_KIND__MAX/
 ---
@@ -9,7 +9,7 @@ s/NET_CLIENT_OPTIONS_KIND_MAX/NET_CLIENT_OPTIONS_KIND__MAX/
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/net/net.c b/net/net.c
-index 8580cc0..369d587 100644
+index 0e3f231..2b9de86 100644
 --- a/net/net.c
 +++ b/net/net.c
 @@ -1333,7 +1333,7 @@ int64_t qmp_get_link_status(const char *name, Error **errp)
diff --git a/debian/patches/pve/0052-vnc-refactor-to-QIOChannelSocket.patch b/debian/patches/pve/0052-vnc-refactor-to-QIOChannelSocket.patch
index 65903a3..f3f01d0 100644
--- a/debian/patches/pve/0052-vnc-refactor-to-QIOChannelSocket.patch
+++ b/debian/patches/pve/0052-vnc-refactor-to-QIOChannelSocket.patch
@@ -1,15 +1,14 @@
-From ff4737549236e6b122d36ef5893058c69795a57f Mon Sep 17 00:00:00 2001
+From 24023a5773869ccac7c4f6d5065c7937396e2df9 Mon Sep 17 00:00:00 2001
 From: Thomas Lamprecht <t.lamprecht at proxmox.com>
 Date: Wed, 6 Apr 2016 16:47:54 +0200
-Subject: [PATCH 52/52] vnc: refactor to QIOChannelSocket
+Subject: [PATCH 52/55] vnc: refactor to QIOChannelSocket
 
-Signed-off-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
 ---
  ui/vnc-auth-vencrypt.c | 31 ++++++++++++++++---------------
  1 file changed, 16 insertions(+), 15 deletions(-)
 
 diff --git a/ui/vnc-auth-vencrypt.c b/ui/vnc-auth-vencrypt.c
-index d11f1df..01aa1de 100644
+index d11f1df..a529520 100644
 --- a/ui/vnc-auth-vencrypt.c
 +++ b/ui/vnc-auth-vencrypt.c
 @@ -28,27 +28,23 @@
diff --git a/debian/patches/pve/0053-vma-use-BlockBackend-on-extract.patch b/debian/patches/pve/0053-vma-use-BlockBackend-on-extract.patch
index 5222ecb..b0e0ff9 100644
--- a/debian/patches/pve/0053-vma-use-BlockBackend-on-extract.patch
+++ b/debian/patches/pve/0053-vma-use-BlockBackend-on-extract.patch
@@ -1,7 +1,7 @@
-From 607c2f6625dab607887132db34d6543dc33390ef Mon Sep 17 00:00:00 2001
+From 817ed44ab0ada0b1fcfcc27763b6e2db546687d6 Mon Sep 17 00:00:00 2001
 From: Thomas Lamprecht <t.lamprecht at proxmox.com>
 Date: Fri, 1 Jul 2016 15:47:29 +0200
-Subject: [PATCH 1/2] vma: use BlockBackend on extract
+Subject: [PATCH 53/55] vma: use BlockBackend on extract
 
 As we else rely on bdrv_close_all() do clean up, which was rewritten
 in ca9bd24cf1d53775169ba9adc17e265554d1afed and fails on "dangling"
diff --git a/debian/patches/pve/0054-rbd-disable-rbd_cache_writethrough_until_flush-with-.patch b/debian/patches/pve/0054-rbd-disable-rbd_cache_writethrough_until_flush-with-.patch
index e1fab0b..0122420 100644
--- a/debian/patches/pve/0054-rbd-disable-rbd_cache_writethrough_until_flush-with-.patch
+++ b/debian/patches/pve/0054-rbd-disable-rbd_cache_writethrough_until_flush-with-.patch
@@ -1,7 +1,7 @@
-From da5bf657823ed2f5a790363b5338f30be68de62b Mon Sep 17 00:00:00 2001
+From 75eead3024d641e0ff2fa7a901a41781101cf87c Mon Sep 17 00:00:00 2001
 From: Alexandre Derumier <aderumier at odiso.com>
 Date: Tue, 26 Jul 2016 16:51:00 +0200
-Subject: [PATCH] rbd: disable rbd_cache_writethrough_until_flush with
+Subject: [PATCH 54/55] rbd: disable rbd_cache_writethrough_until_flush with
  cache=unsafe
 
 Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
diff --git a/debian/patches/pve/0055-enable-cache-unsafe-for-vma-extract_content-and-qmp_.patch b/debian/patches/pve/0055-enable-cache-unsafe-for-vma-extract_content-and-qmp_.patch
new file mode 100644
index 0000000..64da954
--- /dev/null
+++ b/debian/patches/pve/0055-enable-cache-unsafe-for-vma-extract_content-and-qmp_.patch
@@ -0,0 +1,44 @@
+From 6775cc94517696abe12bbae601395b7a16e06ba0 Mon Sep 17 00:00:00 2001
+From: Wolfgang Bumiller <w.bumiller at proxmox.com>
+Date: Mon, 1 Aug 2016 10:52:46 +0200
+Subject: [PATCH 55/55] enable cache=unsafe for vma extract_content and
+ qmp_savevm_start
+
+We don't send any flush here, so we need to open with cache=unsafe.
+
+Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
+For-patch: BDRV_O_CACHE_WB was removed
+---
+ savevm-async.c | 2 +-
+ vma.c          | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/savevm-async.c b/savevm-async.c
+index 2c41b17..6a2266c 100644
+--- a/savevm-async.c
++++ b/savevm-async.c
+@@ -253,7 +253,7 @@ void qmp_savevm_start(bool has_statefile, const char *statefile, Error **errp)
+ {
+     Error *local_err = NULL;
+ 
+-    int bdrv_oflags = BDRV_O_RDWR;
++    int bdrv_oflags = BDRV_O_RDWR | BDRV_O_NO_FLUSH;
+     int ret;
+ 
+     if (snap_state.state != SAVE_STATE_DONE) {
+diff --git a/vma.c b/vma.c
+index 0716a45..4d2d5ad 100644
+--- a/vma.c
++++ b/vma.c
+@@ -280,7 +280,7 @@ static int extract_content(int argc, char **argv)
+         } else if (di) {
+             char *devfn = NULL;
+             const char *format = NULL;
+-            int flags = BDRV_O_RDWR;
++            int flags = BDRV_O_RDWR | BDRV_O_NO_FLUSH;
+             bool write_zero = true;
+ 
+             if (readmap) {
+-- 
+2.1.4
+
diff --git a/debian/patches/series b/debian/patches/series
index 27301d6..d039f9b 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -41,7 +41,7 @@ pve/0040-vnc-make-x509-imply-tls-again.patch
 pve/0041-PVE-VNC-authentication.patch
 pve/0042-vma-writer-don-t-bail-out-on-zero-length-files.patch
 pve/0043-vma-better-driver-guessing-for-bdrv_open.patch
-pve/0044-block-add-zeroinit.patch
+pve/0044-block-add-the-zeroinit-block-driver-filter.patch
 pve/0045-vma-add-format-option-to-device-mapping.patch
 pve/0046-pve-cleanup-includes-all-over-the-place.patch
 pve/0047-zeroinit-bdrv_get_block_status-got-a-new-param.patch
@@ -52,6 +52,7 @@ pve/0051-net-NET_CLIENT_OPTIONS_KIND_MAX-changed.patch
 pve/0052-vnc-refactor-to-QIOChannelSocket.patch
 pve/0053-vma-use-BlockBackend-on-extract.patch
 pve/0054-rbd-disable-rbd_cache_writethrough_until_flush-with-.patch
+pve/0055-enable-cache-unsafe-for-vma-extract_content-and-qmp_.patch
 #see https://bugs.launchpad.net/qemu/+bug/1488363?comments=all
 extra/0001-Revert-target-i386-disable-LINT0-after-reset.patch
 extra/0002-scsi-esp-fix-migration.patch
-- 
2.1.4





More information about the pve-devel mailing list