]> git.proxmox.com Git - pve-qemu-kvm.git/commitdiff
part 1 of 2.4 patch update series
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Mon, 13 Jul 2015 11:27:33 +0000 (13:27 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Mon, 27 Jul 2015 08:26:45 +0000 (10:26 +0200)
debian/patches/0001-friendlier-ai_flag-hints-for-ipv6-hosts.patch [deleted file]
debian/patches/0001-vvfat-add-a-label-option.patch [deleted file]
debian/patches/backup-add-pve-monitor-commands.patch
debian/patches/backup-modify-job-api.patch
debian/patches/internal-snapshot-async.patch
debian/patches/modify-query-machines.patch
debian/patches/modify-query-spice.patch
debian/patches/pve-auth.patch
debian/patches/series
debian/patches/virtio-balloon-fix-query.patch

diff --git a/debian/patches/0001-friendlier-ai_flag-hints-for-ipv6-hosts.patch b/debian/patches/0001-friendlier-ai_flag-hints-for-ipv6-hosts.patch
deleted file mode 100644 (file)
index 4b7dd9c..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-From dea9f9c5d03983bb6a9c75f093b2f9c49e4a5397 Mon Sep 17 00:00:00 2001
-From: Wolfgang Bumiller <w.bumiller@proxmox.com>
-Date: Thu, 21 May 2015 10:48:21 +0200
-Subject: [PATCH] friendlier ai_flag hints for ipv6 hosts
-
-*) Do not use AI_ADDRCONFIG on listening sockets, because this flag
-makes it impossible to explicitly listen on '127.0.0.1' if no global
-ipv4 address is configured additionally, making this a very
-uncomfortable option.
-*) Add AI_V4MAPPED hint for connecting sockets for a similar purpose.
-
-If your system is globally only connected via ipv6 you still want to be
-able to use '127.0.0.1' and 'localhost'.
-Specifically, PVE - unless explicitly asking for insecure mode - uses
-loopback addresses with QEMU for live migrations tunneled over SSH.
-These fail to start because AI_ADDRCONFIG makes getaddrinfo refuse to
-work with '127.0.0.1'.
-
-As for the AI_V4MAPPED flag the situation is similar.
-
-I also want to point out that glibc explicitly sidesteps POSIX standards
-when passing 0 as hints by then assuming both AI_V4MAPPED and
-AI_ADDRCONFIG (the latter being a rather weird choice IMO), while
-according to POSIX.1-2001 it should be assumed 0. (glibc considers its
-choice an improvement.)
-Since either AI_CANONNAME or AI_PASSIVE are passed in our cases, glibc's
-default flags in turn are disabled again unless explicitly added, which
-I do with this patch.
----
- util/qemu-sockets.c | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/util/qemu-sockets.c b/util/qemu-sockets.c
-index 6b97dc1..f99b013 100644
---- a/util/qemu-sockets.c
-+++ b/util/qemu-sockets.c
-@@ -114,7 +114,7 @@ int inet_listen_opts(QemuOpts *opts, int port_offset, Error **errp)
-     int slisten, rc, to, port_min, port_max, p;
-     memset(&ai,0, sizeof(ai));
--    ai.ai_flags = AI_PASSIVE | AI_ADDRCONFIG;
-+    ai.ai_flags = AI_PASSIVE;
-     ai.ai_family = PF_UNSPEC;
-     ai.ai_socktype = SOCK_STREAM;
-@@ -308,7 +308,7 @@ static struct addrinfo *inet_parse_connect_opts(QemuOpts *opts, Error **errp)
-     memset(&ai, 0, sizeof(ai));
--    ai.ai_flags = AI_CANONNAME | AI_ADDRCONFIG;
-+    ai.ai_flags = AI_CANONNAME | AI_V4MAPPED | AI_ADDRCONFIG;
-     ai.ai_family = PF_UNSPEC;
-     ai.ai_socktype = SOCK_STREAM;
-@@ -404,7 +404,7 @@ int inet_dgram_opts(QemuOpts *opts, Error **errp)
-     /* lookup peer addr */
-     memset(&ai,0, sizeof(ai));
--    ai.ai_flags = AI_CANONNAME | AI_ADDRCONFIG;
-+    ai.ai_flags = AI_CANONNAME | AI_V4MAPPED | AI_ADDRCONFIG;
-     ai.ai_family = PF_UNSPEC;
-     ai.ai_socktype = SOCK_DGRAM;
--- 
-2.1.4
-
diff --git a/debian/patches/0001-vvfat-add-a-label-option.patch b/debian/patches/0001-vvfat-add-a-label-option.patch
deleted file mode 100644 (file)
index bc1788e..0000000
+++ /dev/null
@@ -1,119 +0,0 @@
-From 9c13522262d0acadeb3014f4cbc0a508c93fc629 Mon Sep 17 00:00:00 2001
-From: Wolfgang Bumiller <w.bumiller@proxmox.com>
-Date: Thu, 18 Jun 2015 11:36:49 +0200
-Subject: [PATCH] vvfat: add a label option
-
-Till now the vvfat filesystem's label was hardcoded to be
-"QEMU VVFAT", now you can pass a file.label=labelname option
-to the -drive to change it.
-
-Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
----
- block/vvfat.c        | 28 ++++++++++++++++++++++++++--
- qapi/block-core.json |  3 ++-
- 2 files changed, 28 insertions(+), 3 deletions(-)
-
-diff --git a/block/vvfat.c b/block/vvfat.c
-index 9be632f..0ffd1b4 100644
---- a/block/vvfat.c
-+++ b/block/vvfat.c
-@@ -322,6 +322,7 @@ typedef struct BDRVVVFATState {
-     int fat_type; /* 16 or 32 */
-     array_t fat,directory,mapping;
-+    char *volume_label;
-     unsigned int cluster_size;
-     unsigned int sectors_per_cluster;
-@@ -836,6 +837,7 @@ static int init_directories(BDRVVVFATState* s,
-     mapping_t* mapping;
-     unsigned int i;
-     unsigned int cluster;
-+    size_t label_length;
-     memset(&(s->first_sectors[0]),0,0x40*0x200);
-@@ -859,7 +861,17 @@ static int init_directories(BDRVVVFATState* s,
-     {
-       direntry_t* entry=array_get_next(&(s->directory));
-       entry->attributes=0x28; /* archive | volume label */
--        memcpy(entry->name, "QEMU VVFAT ", sizeof(entry->name));
-+        if (!s->volume_label) {
-+            memcpy(entry->name, "QEMU VVFAT ", sizeof(entry->name));
-+        } else {
-+            label_length = strlen(s->volume_label);
-+            if (label_length > sizeof(entry->name)) {
-+                error_setg(errp, "vvfat label cannot be longer than 11 bytes");
-+                return -EINVAL;
-+            }
-+            memcpy(entry->name, s->volume_label, label_length);
-+            memset(entry->name + label_length, ' ', sizeof(entry->name)-label_length);
-+        }
-     }
-     /* Now build FAT, and write back information into directory */
-@@ -968,7 +980,12 @@ static int init_directories(BDRVVVFATState* s,
-     bootsector->u.fat16.signature=0x29;
-     bootsector->u.fat16.id=cpu_to_le32(0xfabe1afd);
--    memcpy(bootsector->u.fat16.volume_label,"QEMU VVFAT ",11);
-+    if (!s->volume_label) {
-+        memcpy(bootsector->u.fat16.volume_label,"QEMU VVFAT ",11);
-+    } else {
-+        memcpy(bootsector->u.fat16.volume_label, s->volume_label, label_length);
-+        memset(bootsector->u.fat16.volume_label + label_length, ' ', 11-label_length);
-+    }
-     memcpy(bootsector->fat_type,(s->fat_type==12?"FAT12   ":s->fat_type==16?"FAT16   ":"FAT32   "),8);
-     bootsector->magic[0]=0x55; bootsector->magic[1]=0xaa;
-@@ -1008,6 +1025,11 @@ static QemuOptsList runtime_opts = {
-             .help = "Create a floppy rather than a hard disk image",
-         },
-         {
-+            .name = "label",
-+            .type = QEMU_OPT_STRING,
-+            .help = "Use a partition label other than QEMU VVFAT",
-+        },
-+        {
-             .name = "rw",
-             .type = QEMU_OPT_BOOL,
-             .help = "Make the image writable",
-@@ -1095,6 +1117,7 @@ static int vvfat_open(BlockDriverState *bs, QDict *options, int flags,
-     s->fat_type = qemu_opt_get_number(opts, "fat-type", 0);
-     floppy = qemu_opt_get_bool(opts, "floppy", false);
-+    s->volume_label = g_strdup(qemu_opt_get(opts, "label"));
-     if (floppy) {
-         /* 1.44MB or 2.88MB floppy.  2.88MB can be FAT12 (default) or FAT16. */
-@@ -2968,6 +2991,7 @@ static void vvfat_close(BlockDriverState *bs)
-     array_free(&(s->directory));
-     array_free(&(s->mapping));
-     g_free(s->cluster_buffer);
-+    g_free(s->volume_label);
-     if (s->qcow) {
-         migrate_del_blocker(s->migration_blocker);
-diff --git a/qapi/block-core.json b/qapi/block-core.json
-index 7873084..8dd3f3f 100644
---- a/qapi/block-core.json
-+++ b/qapi/block-core.json
-@@ -1325,13 +1325,14 @@
- # @fat-type:    #optional FAT type: 12, 16 or 32
- # @floppy:      #optional whether to export a floppy image (true) or
- #               partitioned hard disk (false; default)
-+# @label:       #optional override default label
- # @rw:          #optional whether to allow write operations (default: false)
- #
- # Since: 1.7
- ##
- { 'type': 'BlockdevOptionsVVFAT',
-   'data': { 'dir': 'str', '*fat-type': 'int', '*floppy': 'bool',
--            '*rw': 'bool' } }
-+            '*label': 'str', '*rw': 'bool' } }
- ##
- # @BlockdevOptionsGenericFormat
--- 
-2.1.4
-
index e58033e3fc741677b77d458152c141219e08dfe7..450be3b404b30ba67c62e21e51c44d0269c19a6d 100644 (file)
@@ -583,8 +583,8 @@ Index: new/hmp.h
 --- new.orig/hmp.h     2014-11-20 06:45:05.000000000 +0100
 +++ new/hmp.h  2014-11-20 07:47:31.000000000 +0100
 @@ -29,6 +29,7 @@
- void hmp_info_migrate(Monitor *mon, const QDict *qdict);
  void hmp_info_migrate_capabilities(Monitor *mon, const QDict *qdict);
+ void hmp_info_migrate_parameters(Monitor *mon, const QDict *qdict);
  void hmp_info_migrate_cache_size(Monitor *mon, const QDict *qdict);
 +void hmp_info_backup(Monitor *mon, const QDict *qdict);
  void hmp_info_cpus(Monitor *mon, const QDict *qdict);
index f5e81a73a08b49c56d2e93fd932928bd36493cd9..b2ce47e68c68487a8639f75c5b7d7cd0d1d9c02d 100644 (file)
@@ -3,7 +3,7 @@ Index: new/block/backup.c
 --- new.orig/block/backup.c    2014-11-20 07:55:31.000000000 +0100
 +++ new/block/backup.c 2014-11-20 08:56:23.000000000 +0100
 @@ -39,6 +39,7 @@
-     BlockDriverState *target;
+     BdrvDirtyBitmap *sync_bitmap;
      MirrorSyncMode sync_mode;
      RateLimit limit;
 +    BackupDumpFunc *dump_cb;
@@ -78,7 +78,7 @@ Index: new/block/backup.c
      bdrv_add_before_write_notifier(bs, &before_write);
  
 @@ -359,8 +373,10 @@
+     }
      hbitmap_free(job->bitmap);
  
 -    bdrv_iostatus_disable(target);
@@ -91,7 +91,7 @@ Index: new/block/backup.c
      data = g_malloc(sizeof(*data));
      data->ret = ret;
 @@ -370,13 +386,15 @@ for backup_start
-                   int64_t speed, MirrorSyncMode sync_mode,
+                   BdrvDirtyBitmap *sync_bitmap,
                    BlockdevOnError on_source_error,
                    BlockdevOnError on_target_error,
 +                  BackupDumpFunc *dump_cb,
@@ -125,8 +125,8 @@ Index: new/block/backup.c
          return;
      }
  
-@@ -397,12 +415,15 @@ in backup_start
-         return;
+@@ -397,14 +415,17 @@ in backup_start
+         goto error;
      }
  
 -    bdrv_op_block_all(target, job->common.blocker);
@@ -138,6 +138,8 @@ Index: new/block/backup.c
      job->on_target_error = on_target_error;
      job->target = target;
      job->sync_mode = sync_mode;
+     job->sync_bitmap = sync_mode == MIRROR_SYNC_MODE_INCREMENTAL ?
+                        sync_bitmap : NULL;
 +    job->common.paused = paused;
      job->common.len = len;
      job->common.co = qemu_coroutine_create(backup_run);
@@ -146,21 +148,23 @@ Index: new/blockdev.c
 ===================================================================
 --- new.orig/blockdev.c        2014-11-20 07:55:31.000000000 +0100
 +++ new/blockdev.c     2014-11-20 08:48:02.000000000 +0100
-@@ -2223,7 +2223,7 @@ qmp_drive_backup
-     bdrv_set_aio_context(target_bs, aio_context);
+@@ -2223,8 +2223,8 @@ qmp_drive_backup
+     }
  
-     backup_start(bs, target_bs, speed, sync, on_source_error, on_target_error,
+     backup_start(bs, target_bs, speed, sync, bmap,
+-                 on_source_error, on_target_error,
 -                 block_job_cb, bs, &local_err);
-+                 NULL, block_job_cb, bs, false, &local_err);
++                 on_source_error, on_target_error, NULL,
++                 block_job_cb, bs, false, &local_err);
      if (local_err != NULL) {
          bdrv_unref(target_bs);
          error_propagate(errp, local_err);
 @@ -2284,7 +2284,7 @@ qmp_blockdev_backup
      bdrv_ref(target_bs);
      bdrv_set_aio_context(target_bs, aio_context);
-     backup_start(bs, target_bs, speed, sync, on_source_error, on_target_error,
--                 block_job_cb, bs, &local_err);
-+                 NULL, block_job_cb, bs, false, &local_err);
+     backup_start(bs, target_bs, speed, sync, NULL, on_source_error,
+-                 on_target_error, block_job_cb, bs, &local_err);
++                 on_target_error, NULL, block_job_cb, bs, false, &local_err);
      if (local_err != NULL) {
          bdrv_unref(target_bs);
          error_propagate(errp, local_err);
@@ -179,7 +183,7 @@ Index: new/include/block/block_int.h
      BlockDriverState *bs;
      int64_t offset;
 @@ -583,7 +586,9 @@
-                   int64_t speed, MirrorSyncMode sync_mode,
+                   BdrvDirtyBitmap *sync_bitmap,
                    BlockdevOnError on_source_error,
                    BlockdevOnError on_target_error,
 +                  BackupDumpFunc *dump_cb,
index e6d8a139d77fe0413cfb2cbf4683358d8392aed2..f79a3cf4000e0a463a87519dc6c6d3bae123dcea 100644 (file)
@@ -38,7 +38,7 @@ Index: new/block.c
 --- new.orig/block.c   2014-11-20 09:13:01.000000000 +0100
 +++ new/block.c        2014-11-20 09:16:47.000000000 +0100
 @@ -2202,7 +2202,7 @@
-     bdrv_set_backing_hd(bs_top, bs_new);
+     bdrv_attach_child(bs_top, bs_new, &child_backing);
  }
  
 -static void bdrv_delete(BlockDriverState *bs)
@@ -50,8 +50,8 @@ Index: new/hmp-commands.hx
 ===================================================================
 --- new.orig/hmp-commands.hx   2014-11-20 09:13:01.000000000 +0100
 +++ new/hmp-commands.hx        2014-11-20 09:16:47.000000000 +0100
-@@ -1797,6 +1797,8 @@
- show current migration capabilities
+@@ -1809,6 +1809,8 @@
+ show current migration parameters
  @item info migrate_cache_size
  show current migration XBZRLE cache size
 +@item info savevm
@@ -59,7 +59,7 @@ Index: new/hmp-commands.hx
  @item info balloon
  show balloon information
  @item info qtree
-@@ -1822,3 +1824,35 @@
+@@ -1857,3 +1859,35 @@
  STEXI
  @end table
  ETEXI
@@ -174,7 +174,7 @@ Index: new/hmp.h
 +void hmp_info_savevm(Monitor *mon, const QDict *qdict);
  void hmp_info_migrate(Monitor *mon, const QDict *qdict);
  void hmp_info_migrate_capabilities(Monitor *mon, const QDict *qdict);
- void hmp_info_migrate_cache_size(Monitor *mon, const QDict *qdict);
+ void hmp_info_migrate_parameters(Monitor *mon, const QDict *qdict);
 @@ -85,6 +86,10 @@
  void hmp_netdev_del(Monitor *mon, const QDict *qdict);
  void hmp_getfd(Monitor *mon, const QDict *qdict);
@@ -202,7 +202,7 @@ Index: new/include/sysemu/sysemu.h
 ===================================================================
 --- new.orig/include/sysemu/sysemu.h   2014-11-20 09:13:01.000000000 +0100
 +++ new/include/sysemu/sysemu.h        2014-11-20 09:16:47.000000000 +0100
-@@ -76,16 +76,17 @@
+@@ -76,17 +76,18 @@
  
  void hmp_savevm(Monitor *mon, const QDict *qdict);
  int load_vmstate(const char *name);
@@ -216,6 +216,7 @@ Index: new/include/sysemu/sysemu.h
 -void qemu_savevm_state_begin(QEMUFile *f,
 +int qemu_savevm_state_begin(QEMUFile *f,
                               const MigrationParams *params);
+ void qemu_savevm_state_header(QEMUFile *f);
  int qemu_savevm_state_iterate(QEMUFile *f);
 -void qemu_savevm_state_complete(QEMUFile *f);
 +int qemu_savevm_state_complete(QEMUFile *f);
@@ -334,12 +335,11 @@ Index: new/qmp-commands.hx
 ===================================================================
 --- new.orig/qmp-commands.hx   2014-11-20 09:13:01.000000000 +0100
 +++ new/qmp-commands.hx        2014-11-20 09:16:47.000000000 +0100
-@@ -3883,3 +3883,34 @@
+@@ -4200,6 +4200,36 @@
  <- { "return": {} }
  
  EQMP
 +
-+
 +    {
 +        .name       = "savevm-start",
 +        .args_type  = "statefile:s?",
@@ -369,6 +369,9 @@ Index: new/qmp-commands.hx
 +        .args_type  = "",
 +        .mhandler.cmd_new = qmp_marshal_input_query_savevm,
 +    },
+     {
+         .name       = "query-rocker",
 Index: new/savevm-async.c
 ===================================================================
 --- /dev/null  1970-01-01 00:00:00.000000000 +0000
@@ -879,10 +882,10 @@ Index: new/savevm-async.c
 +}
 Index: new/savevm.c
 ===================================================================
---- new.orig/savevm.c  2014-11-20 09:13:01.000000000 +0100
-+++ new/savevm.c       2014-11-20 09:16:47.000000000 +0100
-@@ -596,11 +596,11 @@
-     return false;
+--- new.orig/migration/savevm.c        2014-11-20 09:13:01.000000000 +0100
++++ new/migration/savevm.c     2014-11-20 09:16:47.000000000 +0100
+@@ -718,11 +718,11 @@
+     qemu_put_be32(f, QEMU_VM_FILE_VERSION);
  }
  
 -void qemu_savevm_state_begin(QEMUFile *f,
@@ -894,7 +897,7 @@ Index: new/savevm.c
 +    int ret = 0;
  
      trace_savevm_state_begin();
-     QTAILQ_FOREACH(se, &savevm_handlers, entry) {
+     QTAILQ_FOREACH(se, &savevm_state.handlers, entry) {
 @@ -642,6 +642,7 @@
              break;
          }
@@ -912,8 +915,8 @@ Index: new/savevm.c
  {
      QJSON *vmdesc;
      int vmdesc_len;
-@@ -717,7 +718,7 @@
-         trace_savevm_section_end(se->idstr, se->section_id, ret);
+@@ -838,7 +839,7 @@
+         save_section_footer(f, se);
          if (ret < 0) {
              qemu_file_set_error(f, ret);
 -            return;
index d028e3e1ca85fe53b2258f2de1d23a07dd40cc32..5edcdd2ba90d8fff4825ca0f4e533a9325147d50 100644 (file)
@@ -13,7 +13,7 @@ Index: new/qapi-schema.json
  #
 @@ -2400,7 +2402,7 @@
  ##
- { 'type': 'MachineInfo',
+ { 'struct': 'MachineInfo',
    'data': { 'name': 'str', '*alias': 'str',
 -            '*is-default': 'bool', 'cpu-max': 'int' } }
 +            '*is-default': 'bool', '*is-current': 'bool', 'cpu-max': 'int' } }
index c485b03f31baffb6b4832aa4d251f48a0641887e..4e5222df43d5fe7c9fa5668307b496385444e79e 100644 (file)
@@ -35,7 +35,7 @@ Index: new/qapi-schema.json
 +#
  # Since: 0.14.0
  ##
- { 'type': 'SpiceInfo',
+ { 'struct': 'SpiceInfo',
    'data': {'enabled': 'bool', 'migrated': 'bool', '*host': 'str', '*port': 'int',
             '*tls-port': 'int', '*auth': 'str', '*compiled-version': 'str',
 +           '*ticket': 'str',
index 0d1d43ae2ae21f45d4fd79ac659f12f76aef9414..9facc1ad811ef8e303821d1e32036c87ed72d268 100644 (file)
@@ -37,8 +37,8 @@ Index: new/vl.c
 +                pve_auth_setup(vm_id_long);
 +                break;
              case QEMU_OPTION_vnc:
+             {
  #ifdef CONFIG_VNC
-                 if (vnc_parse_func(optarg) == NULL) {
 Index: new/include/ui/console.h
 ===================================================================
 --- new.orig/include/ui/console.h      2014-11-20 06:45:06.000000000 +0100
@@ -57,7 +57,7 @@ Index: new/ui/vnc.c
 +++ new/ui/vnc.c       2014-11-20 06:50:55.000000000 +0100
 @@ -48,6 +48,125 @@
  #include "vnc_keysym.h"
- #include "d3des.h"
+ #include "crypto/cipher.h"
  
 +static int pve_vmid = 0;
 +
index a01847336b3080e928e9ee565240a0fb4077dc8f..6ee07fa9639e46caf6c106c9cf6bd5a34b57ed69 100644 (file)
@@ -30,8 +30,6 @@ backup-vma-extract-add-block-driver-type.patch
 glusterfs-daemonize.patch
 gluster-backupserver.patch
 add-qmp-get-link-status.patch
-0001-friendlier-ai_flag-hints-for-ipv6-hosts.patch
-0001-vvfat-add-a-label-option.patch
 jemalloc.patch
 mirror-sleep.patch
 mirror-sleep2.patch
index 236a624a58403f2f92664dae67200035ed86fe49..97574d798641fd2202a9846ea40ac0fd451ece93 100644 (file)
@@ -87,13 +87,7 @@ Index: new/qapi-schema.json
 ===================================================================
 --- new.orig/qapi-schema.json  2014-11-20 06:45:06.000000000 +0100
 +++ new/qapi-schema.json       2014-11-20 07:26:23.000000000 +0100
-@@ -983,15 +983,34 @@
- ##
- # @BalloonInfo:
--#
-+# 
- # Information about the guest balloon device.
+@@ -983,10 +983,29 @@
  #
  # @actual: the number of bytes the balloon currently contains
  #
@@ -116,8 +110,8 @@ Index: new/qapi-schema.json
 +# 
 +# Since: 0.14.0
  ##
--{ 'type': 'BalloonInfo', 'data': {'actual': 'int' } }
-+{ 'type': 'BalloonInfo',
+-{ 'struct': 'BalloonInfo', 'data': {'actual': 'int' } }
++{ 'struct': 'BalloonInfo',
 +  'data': {'actual': 'int', '*last_update': 'int', '*mem_swapped_in': 'int',
 +           '*mem_swapped_out': 'int', '*major_page_faults': 'int',
 +           '*minor_page_faults': 'int', '*free_mem': 'int',