All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
To: Juan Quintela <quintela@redhat.com>
Cc: qemu-devel@nongnu.org, lvivier@redhat.com, peterx@redhat.com
Subject: Re: [Qemu-devel] [PATCH 01/41] migration: Create migration/blocker.h
Date: Thu, 27 Apr 2017 12:58:55 +0100	[thread overview]
Message-ID: <20170427115854.GF2082@work-vm> (raw)
In-Reply-To: <20170425220451.6028-2-quintela@redhat.com>

* Juan Quintela (quintela@redhat.com) wrote:
> This allows us to remove lots of includes of migration/migration.h
> 
> Signed-off-by: Juan Quintela <quintela@redhat.com>

Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>

if you need to regenerate it, I think the xvzrle.h move is out of place
in this patch.

Dave

> ---
>  block/qcow.c                              |  2 +-
>  block/vdi.c                               |  2 +-
>  block/vhdx.c                              |  2 +-
>  block/vmdk.c                              |  2 +-
>  block/vpc.c                               |  2 +-
>  block/vvfat.c                             |  2 +-
>  hw/9pfs/9p.c                              |  2 +-
>  hw/display/qxl.c                          |  2 +-
>  hw/display/virtio-gpu.c                   |  2 +-
>  hw/intc/arm_gic_kvm.c                     |  2 +-
>  hw/intc/arm_gicv3_its_kvm.c               |  2 +-
>  hw/intc/arm_gicv3_kvm.c                   |  2 +-
>  hw/misc/ivshmem.c                         |  2 +-
>  hw/scsi/vhost-scsi.c                      |  2 +-
>  hw/virtio/vhost.c                         |  2 +-
>  include/migration/blocker.h               | 35 +++++++++++++++++++++++++++++++
>  include/migration/migration.h             | 18 ----------------
>  migration/migration.c                     |  1 +
>  migration/ram.c                           |  2 +-
>  migration/xbzrle.c                        |  2 +-
>  {include/migration => migration}/xbzrle.h |  0
>  stubs/migr-blocker.c                      |  2 +-
>  target/i386/kvm.c                         |  2 +-
>  tests/test-xbzrle.c                       |  2 +-
>  24 files changed, 56 insertions(+), 38 deletions(-)
>  create mode 100644 include/migration/blocker.h
>  rename {include/migration => migration}/xbzrle.h (100%)
> 
> diff --git a/block/qcow.c b/block/qcow.c
> index 9d6ac83..48e852c 100644
> --- a/block/qcow.c
> +++ b/block/qcow.c
> @@ -32,7 +32,7 @@
>  #include <zlib.h>
>  #include "qapi/qmp/qerror.h"
>  #include "crypto/cipher.h"
> -#include "migration/migration.h"
> +#include "migration/blocker.h"
>  
>  /**************************************************************/
>  /* QEMU COW block driver with compression and encryption support */
> diff --git a/block/vdi.c b/block/vdi.c
> index 9b4f70e..5f7b29f 100644
> --- a/block/vdi.c
> +++ b/block/vdi.c
> @@ -55,7 +55,7 @@
>  #include "sysemu/block-backend.h"
>  #include "qemu/module.h"
>  #include "qemu/bswap.h"
> -#include "migration/migration.h"
> +#include "migration/blocker.h"
>  #include "qemu/coroutine.h"
>  #include "qemu/cutils.h"
>  #include "qemu/uuid.h"
> diff --git a/block/vhdx.c b/block/vhdx.c
> index 052a753..6128b7b 100644
> --- a/block/vhdx.c
> +++ b/block/vhdx.c
> @@ -24,7 +24,7 @@
>  #include "qemu/crc32c.h"
>  #include "qemu/bswap.h"
>  #include "block/vhdx.h"
> -#include "migration/migration.h"
> +#include "migration/blocker.h"
>  #include "qemu/uuid.h"
>  
>  /* Options for VHDX creation */
> diff --git a/block/vmdk.c b/block/vmdk.c
> index a9bd22b..f09f0b2 100644
> --- a/block/vmdk.c
> +++ b/block/vmdk.c
> @@ -31,7 +31,7 @@
>  #include "qemu/error-report.h"
>  #include "qemu/module.h"
>  #include "qemu/bswap.h"
> -#include "migration/migration.h"
> +#include "migration/blocker.h"
>  #include "qemu/cutils.h"
>  #include <zlib.h>
>  
> diff --git a/block/vpc.c b/block/vpc.c
> index f591d4b..cb2d4cf 100644
> --- a/block/vpc.c
> +++ b/block/vpc.c
> @@ -28,7 +28,7 @@
>  #include "block/block_int.h"
>  #include "sysemu/block-backend.h"
>  #include "qemu/module.h"
> -#include "migration/migration.h"
> +#include "migration/blocker.h"
>  #include "qemu/bswap.h"
>  #include "qemu/uuid.h"
>  
> diff --git a/block/vvfat.c b/block/vvfat.c
> index b509d55..3fcc59c 100644
> --- a/block/vvfat.c
> +++ b/block/vvfat.c
> @@ -28,7 +28,7 @@
>  #include "block/block_int.h"
>  #include "qemu/module.h"
>  #include "qemu/bswap.h"
> -#include "migration/migration.h"
> +#include "migration/blocker.h"
>  #include "qapi/qmp/qint.h"
>  #include "qapi/qmp/qbool.h"
>  #include "qapi/qmp/qstring.h"
> diff --git a/hw/9pfs/9p.c b/hw/9pfs/9p.c
> index c80ba67..ab3e22f 100644
> --- a/hw/9pfs/9p.c
> +++ b/hw/9pfs/9p.c
> @@ -23,7 +23,7 @@
>  #include "9p-xattr.h"
>  #include "coth.h"
>  #include "trace.h"
> -#include "migration/migration.h"
> +#include "migration/blocker.h"
>  
>  int open_fd_hw;
>  int total_open_fd;
> diff --git a/hw/display/qxl.c b/hw/display/qxl.c
> index 4d94cec..ad09bb9 100644
> --- a/hw/display/qxl.c
> +++ b/hw/display/qxl.c
> @@ -26,7 +26,7 @@
>  #include "qemu/queue.h"
>  #include "qemu/atomic.h"
>  #include "sysemu/sysemu.h"
> -#include "migration/migration.h"
> +#include "migration/blocker.h"
>  #include "trace.h"
>  
>  #include "qxl.h"
> diff --git a/hw/display/virtio-gpu.c b/hw/display/virtio-gpu.c
> index e1056f3..8ad27f3 100644
> --- a/hw/display/virtio-gpu.c
> +++ b/hw/display/virtio-gpu.c
> @@ -19,7 +19,7 @@
>  #include "hw/virtio/virtio.h"
>  #include "hw/virtio/virtio-gpu.h"
>  #include "hw/virtio/virtio-bus.h"
> -#include "migration/migration.h"
> +#include "migration/blocker.h"
>  #include "qemu/log.h"
>  #include "qapi/error.h"
>  
> diff --git a/hw/intc/arm_gic_kvm.c b/hw/intc/arm_gic_kvm.c
> index ec952ec..af5cd36 100644
> --- a/hw/intc/arm_gic_kvm.c
> +++ b/hw/intc/arm_gic_kvm.c
> @@ -24,7 +24,7 @@
>  #include "qemu-common.h"
>  #include "cpu.h"
>  #include "hw/sysbus.h"
> -#include "migration/migration.h"
> +#include "migration/blocker.h"
>  #include "sysemu/kvm.h"
>  #include "kvm_arm.h"
>  #include "gic_internal.h"
> diff --git a/hw/intc/arm_gicv3_its_kvm.c b/hw/intc/arm_gicv3_its_kvm.c
> index bd4f3aa..a0441d6 100644
> --- a/hw/intc/arm_gicv3_its_kvm.c
> +++ b/hw/intc/arm_gicv3_its_kvm.c
> @@ -24,7 +24,7 @@
>  #include "sysemu/sysemu.h"
>  #include "sysemu/kvm.h"
>  #include "kvm_arm.h"
> -#include "migration/migration.h"
> +#include "migration/blocker.h"
>  
>  #define TYPE_KVM_ARM_ITS "arm-its-kvm"
>  #define KVM_ARM_ITS(obj) OBJECT_CHECK(GICv3ITSState, (obj), TYPE_KVM_ARM_ITS)
> diff --git a/hw/intc/arm_gicv3_kvm.c b/hw/intc/arm_gicv3_kvm.c
> index 19aab56..4ee2baa 100644
> --- a/hw/intc/arm_gicv3_kvm.c
> +++ b/hw/intc/arm_gicv3_kvm.c
> @@ -28,7 +28,7 @@
>  #include "kvm_arm.h"
>  #include "gicv3_internal.h"
>  #include "vgic_common.h"
> -#include "migration/migration.h"
> +#include "migration/blocker.h"
>  
>  #ifdef DEBUG_GICV3_KVM
>  #define DPRINTF(fmt, ...) \
> diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c
> index 82ce837..475e36a 100644
> --- a/hw/misc/ivshmem.c
> +++ b/hw/misc/ivshmem.c
> @@ -25,7 +25,7 @@
>  #include "hw/pci/msi.h"
>  #include "hw/pci/msix.h"
>  #include "sysemu/kvm.h"
> -#include "migration/migration.h"
> +#include "migration/blocker.h"
>  #include "qemu/error-report.h"
>  #include "qemu/event_notifier.h"
>  #include "qom/object_interfaces.h"
> diff --git a/hw/scsi/vhost-scsi.c b/hw/scsi/vhost-scsi.c
> index f53bc17..0558737 100644
> --- a/hw/scsi/vhost-scsi.c
> +++ b/hw/scsi/vhost-scsi.c
> @@ -21,7 +21,7 @@
>  #include "qemu/error-report.h"
>  #include "qemu/queue.h"
>  #include "monitor/monitor.h"
> -#include "migration/migration.h"
> +#include "migration/blocker.h"
>  #include "hw/virtio/vhost-scsi.h"
>  #include "hw/virtio/vhost.h"
>  #include "hw/virtio/virtio-scsi.h"
> diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c
> index 0001e60..03a46a7 100644
> --- a/hw/virtio/vhost.c
> +++ b/hw/virtio/vhost.c
> @@ -25,7 +25,7 @@
>  #include "exec/address-spaces.h"
>  #include "hw/virtio/virtio-bus.h"
>  #include "hw/virtio/virtio-access.h"
> -#include "migration/migration.h"
> +#include "migration/blocker.h"
>  #include "sysemu/dma.h"
>  
>  /* enabled until disconnected backend stabilizes */
> diff --git a/include/migration/blocker.h b/include/migration/blocker.h
> new file mode 100644
> index 0000000..acd2701
> --- /dev/null
> +++ b/include/migration/blocker.h
> @@ -0,0 +1,35 @@
> +/*
> + * QEMU migration blockers
> + *
> + * Copyright IBM, Corp. 2008
> + *
> + * Authors:
> + *  Anthony Liguori   <aliguori@us.ibm.com>
> + *
> + * This work is licensed under the terms of the GNU GPL, version 2.  See
> + * the COPYING file in the top-level directory.
> + *
> + */
> +
> +#ifndef MIGRATION_BLOCKER_H
> +#define MIGRATION_BLOCKER_H
> +
> +/**
> + * @migrate_add_blocker - prevent migration from proceeding
> + *
> + * @reason - an error to be returned whenever migration is attempted
> + *
> + * @errp - [out] The reason (if any) we cannot block migration right now.
> + *
> + * @returns - 0 on success, -EBUSY/-EACCES on failure, with errp set.
> + */
> +int migrate_add_blocker(Error *reason, Error **errp);
> +
> +/**
> + * @migrate_del_blocker - remove a blocking error from migration
> + *
> + * @reason - the error blocking migration
> + */
> +void migrate_del_blocker(Error *reason);
> +
> +#endif
> diff --git a/include/migration/migration.h b/include/migration/migration.h
> index 9579280..02b074f 100644
> --- a/include/migration/migration.h
> +++ b/include/migration/migration.h
> @@ -267,24 +267,6 @@ int ram_discard_range(const char *block_name, uint64_t start, size_t length);
>  int ram_postcopy_incoming_init(MigrationIncomingState *mis);
>  void ram_postcopy_migrated_memory_release(MigrationState *ms);
>  
> -/**
> - * @migrate_add_blocker - prevent migration from proceeding
> - *
> - * @reason - an error to be returned whenever migration is attempted
> - *
> - * @errp - [out] The reason (if any) we cannot block migration right now.
> - *
> - * @returns - 0 on success, -EBUSY/-EACCES on failure, with errp set.
> - */
> -int migrate_add_blocker(Error *reason, Error **errp);
> -
> -/**
> - * @migrate_del_blocker - remove a blocking error from migration
> - *
> - * @reason - the error blocking migration
> - */
> -void migrate_del_blocker(Error *reason);
> -
>  bool migrate_release_ram(void);
>  bool migrate_postcopy_ram(void);
>  bool migrate_zero_blocks(void);
> diff --git a/migration/migration.c b/migration/migration.c
> index f094079..8625a6c 100644
> --- a/migration/migration.c
> +++ b/migration/migration.c
> @@ -17,6 +17,7 @@
>  #include "qemu/cutils.h"
>  #include "qemu/error-report.h"
>  #include "qemu/main-loop.h"
> +#include "migration/blocker.h"
>  #include "migration/migration.h"
>  #include "migration/qemu-file.h"
>  #include "sysemu/sysemu.h"
> diff --git a/migration/ram.c b/migration/ram.c
> index 5428026..4e562be 100644
> --- a/migration/ram.c
> +++ b/migration/ram.c
> @@ -35,7 +35,7 @@
>  #include "qemu/bitmap.h"
>  #include "qemu/timer.h"
>  #include "qemu/main-loop.h"
> -#include "migration/xbzrle.h"
> +#include "xbzrle.h"
>  #include "migration/migration.h"
>  #include "migration/postcopy-ram.h"
>  #include "exec/address-spaces.h"
> diff --git a/migration/xbzrle.c b/migration/xbzrle.c
> index 421bca0..1ba482d 100644
> --- a/migration/xbzrle.c
> +++ b/migration/xbzrle.c
> @@ -12,7 +12,7 @@
>   */
>  #include "qemu/osdep.h"
>  #include "qemu/cutils.h"
> -#include "migration/xbzrle.h"
> +#include "xbzrle.h"
>  
>  /*
>    page = zrun nzrun
> diff --git a/include/migration/xbzrle.h b/migration/xbzrle.h
> similarity index 100%
> rename from include/migration/xbzrle.h
> rename to migration/xbzrle.h
> diff --git a/stubs/migr-blocker.c b/stubs/migr-blocker.c
> index a5ba18f..2b64ac9 100644
> --- a/stubs/migr-blocker.c
> +++ b/stubs/migr-blocker.c
> @@ -1,6 +1,6 @@
>  #include "qemu/osdep.h"
>  #include "qemu-common.h"
> -#include "migration/migration.h"
> +#include "migration/blocker.h"
>  
>  int migrate_add_blocker(Error *reason, Error **errp)
>  {
> diff --git a/target/i386/kvm.c b/target/i386/kvm.c
> index 55865db..011d4a5 100644
> --- a/target/i386/kvm.c
> +++ b/target/i386/kvm.c
> @@ -43,7 +43,7 @@
>  #include "standard-headers/asm-x86/hyperv.h"
>  #include "hw/pci/pci.h"
>  #include "hw/pci/msi.h"
> -#include "migration/migration.h"
> +#include "migration/blocker.h"
>  #include "exec/memattrs.h"
>  #include "trace.h"
>  
> diff --git a/tests/test-xbzrle.c b/tests/test-xbzrle.c
> index d97b5eb..f5e08de 100644
> --- a/tests/test-xbzrle.c
> +++ b/tests/test-xbzrle.c
> @@ -13,7 +13,7 @@
>  #include "qemu/osdep.h"
>  #include "qemu-common.h"
>  #include "qemu/cutils.h"
> -#include "include/migration/xbzrle.h"
> +#include "../migration/xbzrle.h"
>  
>  #define PAGE_SIZE 4096
>  
> -- 
> 2.9.3
> 
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK

  reply	other threads:[~2017-04-27 11:59 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-25 22:04 [Qemu-devel] [PATCH 00/41] Migration cleanup Juan Quintela
2017-04-25 22:04 ` [Qemu-devel] [PATCH 01/41] migration: Create migration/blocker.h Juan Quintela
2017-04-27 11:58   ` Dr. David Alan Gilbert [this message]
2017-05-10  9:55   ` Peter Xu
2017-04-25 22:04 ` [Qemu-devel] [PATCH 02/41] migration: Split migration/channel.c for channel operations Juan Quintela
2017-04-25 22:04 ` [Qemu-devel] [PATCH 03/41] migration: Remove MigrationState from migration_channel_incomming() Juan Quintela
2017-04-25 22:04 ` [Qemu-devel] [PATCH 04/41] migration: Export qemu-file-channel.c functions in its own file Juan Quintela
2017-04-25 22:04 ` [Qemu-devel] [PATCH 05/41] migration: Remove migration.h from colo.h Juan Quintela
2017-04-25 22:04 ` [Qemu-devel] [PATCH 06/41] migration: Move colo.h to migration/ Juan Quintela
2017-05-04 19:02   ` Dr. David Alan Gilbert
2017-04-25 22:04 ` [Qemu-devel] [PATCH 07/41] migration: Move failover.h to migration/colo-failover.h Juan Quintela
2017-04-25 22:04 ` [Qemu-devel] [PATCH 08/41] migration: Move page_cache.c to migration/ Juan Quintela
2017-05-04 19:03   ` Dr. David Alan Gilbert
2017-04-25 22:04 ` [Qemu-devel] [PATCH 09/41] migration: Move qjson.h " Juan Quintela
2017-04-25 22:04 ` [Qemu-devel] [PATCH 10/41] migration: Move postcopy-ram.h " Juan Quintela
2017-04-27 12:09   ` Dr. David Alan Gilbert
2017-04-25 22:04 ` [Qemu-devel] [PATCH 11/41] migration: Split vmstate-types.c from vmstate.c Juan Quintela
2017-04-25 22:04 ` [Qemu-devel] [PATCH 12/41] migration: Remove qemu-file.h from vmstate.h Juan Quintela
2017-04-25 22:04 ` [Qemu-devel] [PATCH 13/41] migration: Remove vmstate.h from migration.h Juan Quintela
2017-05-13 20:47   ` Philippe Mathieu-Daudé
2017-04-25 22:04 ` [Qemu-devel] [PATCH 14/41] migration: migration.h was not needed Juan Quintela
2017-04-25 22:04 ` [Qemu-devel] [PATCH 15/41] migration: Create include for migration snapshots Juan Quintela
2017-04-25 22:04 ` [Qemu-devel] [PATCH 16/41] migration: Rename {save, load}_vmstate to {save, load}_snapshot Juan Quintela
2017-04-25 22:04 ` [Qemu-devel] [PATCH 17/41] migration: Create savevm.h for functions exported from savevm.c Juan Quintela
2017-04-25 22:04 ` [Qemu-devel] [PATCH 18/41] migration: Split qemu-file.h Juan Quintela
2017-04-25 22:04 ` [Qemu-devel] [PATCH 19/41] migration: Remove unneeded includes of migration/vmstate.h Juan Quintela
2017-05-13 20:46   ` Philippe Mathieu-Daudé
2017-04-25 22:04 ` [Qemu-devel] [PATCH 20/41] migration: Export exec.c functions in its own file Juan Quintela
2017-04-25 22:04 ` [Qemu-devel] [PATCH 21/41] migration: Export fd.c " Juan Quintela
2017-04-25 22:04 ` [Qemu-devel] [PATCH 22/41] migration: Export socket.c " Juan Quintela
2017-04-25 22:04 ` [Qemu-devel] [PATCH 23/41] migration: Export tls.c " Juan Quintela
2017-04-25 22:04 ` [Qemu-devel] [PATCH 24/41] migration: Export ram.c " Juan Quintela
2017-04-25 22:04 ` [Qemu-devel] [PATCH 25/41] migration: Export rdma.c " Juan Quintela
2017-04-27 11:52   ` Dr. David Alan Gilbert
2017-04-25 22:04 ` [Qemu-devel] [PATCH 26/41] migration: Move include/migration/block.h into migration/ Juan Quintela
2017-04-25 22:04 ` [Qemu-devel] [PATCH 27/41] migration: Move self_announce_delay() to misc.h Juan Quintela
2017-04-25 22:04 ` [Qemu-devel] [PATCH 28/41] migration: Split registration functions from vmstate.h Juan Quintela
2017-04-25 22:04 ` [Qemu-devel] [PATCH 29/41] migration: loadvm_free_handlers is only used in migration/ Juan Quintela
2017-04-25 22:04 ` [Qemu-devel] [PATCH 30/41] migration: Move dump_vmsate_json_to_file() to misc.h Juan Quintela
2017-04-25 22:04 ` [Qemu-devel] [PATCH 31/41] migration: Move postcopy stuff to postcopy-ram.c Juan Quintela
2017-04-28 17:15   ` Dr. David Alan Gilbert
2017-04-25 22:04 ` [Qemu-devel] [PATCH 32/41] migration: Move constants to savevm.h Juan Quintela
2017-04-25 22:04 ` [Qemu-devel] [PATCH 33/41] migration: Commands are only used inside migration.c Juan Quintela
2017-04-25 22:04 ` [Qemu-devel] [PATCH 34/41] migration: ram_control_* are implemented in qemu_file Juan Quintela
2017-04-25 22:04 ` [Qemu-devel] [PATCH 35/41] migration: create global_state.c Juan Quintela
2017-04-25 22:04 ` [Qemu-devel] [PATCH 36/41] migration: Move more exported functions to migration/misc.h Juan Quintela
2017-04-25 22:04 ` [Qemu-devel] [PATCH 37/41] migration: Move last funtions to misc.h Juan Quintela
2017-04-25 22:04 ` [Qemu-devel] [PATCH 38/41] migration: Move migration.h to migration/ Juan Quintela
2017-04-25 22:04 ` [Qemu-devel] [PATCH 39/41] exec: Create include for target_page_size() Juan Quintela
2017-04-25 22:04 ` [Qemu-devel] [PATCH 40/41] migration: Make savevm.c target independent Juan Quintela
2017-04-25 22:04 ` [Qemu-devel] [PATCH 41/41] migration: Remove unneeded includes Juan Quintela
2017-04-27 12:02 ` [Qemu-devel] [PATCH 00/41] Migration cleanup Dr. David Alan Gilbert
2017-04-27 15:02   ` Juan Quintela

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170427115854.GF2082@work-vm \
    --to=dgilbert@redhat.com \
    --cc=lvivier@redhat.com \
    --cc=peterx@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.