migration: Create migration/blocker.h
This allows us to remove lots of includes of migration/migration.h Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Peter Xu <peterx@redhat.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
This commit is contained in:
parent
bb890ed551
commit
795c40b8bd
@ -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 */
|
||||
|
@ -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"
|
||||
|
@ -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 */
|
||||
|
@ -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>
|
||||
|
||||
|
@ -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"
|
||||
|
||||
|
@ -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"
|
||||
|
@ -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;
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
|
||||
|
@ -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"
|
||||
|
@ -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)
|
||||
|
@ -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, ...) \
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
|
@ -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 */
|
||||
|
35
include/migration/blocker.h
Normal file
35
include/migration/blocker.h
Normal file
@ -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
|
@ -275,24 +275,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);
|
||||
|
||||
int check_migratable(Object *obj, Error **err);
|
||||
|
||||
bool migrate_release_ram(void);
|
||||
|
@ -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"
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user