Merge tag 'artist-cursor-fix-final-pull-request' of https://github.com/hdeller/qemu...
[qemu/rayw.git] / include / migration / blocker.h
blob9cebe2ba06acd669202721320c1d3ec2a6178879
1 /*
2 * QEMU migration blockers
4 * Copyright IBM, Corp. 2008
6 * Authors:
7 * Anthony Liguori <aliguori@us.ibm.com>
9 * This work is licensed under the terms of the GNU GPL, version 2. See
10 * the COPYING file in the top-level directory.
14 #ifndef MIGRATION_BLOCKER_H
15 #define MIGRATION_BLOCKER_H
17 /**
18 * @migrate_add_blocker - prevent migration from proceeding
20 * @reason - an error to be returned whenever migration is attempted
22 * @errp - [out] The reason (if any) we cannot block migration right now.
24 * @returns - 0 on success, -EBUSY/-EACCES on failure, with errp set.
26 int migrate_add_blocker(Error *reason, Error **errp);
28 /**
29 * @migrate_add_blocker_internal - prevent migration from proceeding without
30 * only-migrate implications
32 * @reason - an error to be returned whenever migration is attempted
34 * @errp - [out] The reason (if any) we cannot block migration right now.
36 * @returns - 0 on success, -EBUSY on failure, with errp set.
38 * Some of the migration blockers can be temporary (e.g., for a few seconds),
39 * so it shouldn't need to conflict with "-only-migratable". For those cases,
40 * we can call this function rather than @migrate_add_blocker().
42 int migrate_add_blocker_internal(Error *reason, Error **errp);
44 /**
45 * @migrate_del_blocker - remove a blocking error from migration
47 * @reason - the error blocking migration
49 void migrate_del_blocker(Error *reason);
51 #endif