]> git.proxmox.com Git - mirror_qemu.git/blob - migration/block.h
migration: Move include/migration/block.h into migration/
[mirror_qemu.git] / migration / block.h
1 /*
2 * QEMU live block migration
3 *
4 * Copyright IBM, Corp. 2009
5 *
6 * Authors:
7 * Liran Schour <lirans@il.ibm.com>
8 *
9 * This work is licensed under the terms of the GNU GPL, version 2. See
10 * the COPYING file in the top-level directory.
11 *
12 */
13
14 #ifndef MIGRATION_BLOCK_H
15 #define MIGRATION_BLOCK_H
16
17 #ifdef CONFIG_LIVE_BLOCK_MIGRATION
18 int blk_mig_active(void);
19 uint64_t blk_mig_bytes_transferred(void);
20 uint64_t blk_mig_bytes_remaining(void);
21 uint64_t blk_mig_bytes_total(void);
22
23 #else
24 static inline int blk_mig_active(void)
25 {
26 return false;
27 }
28 static inline uint64_t blk_mig_bytes_transferred(void)
29 {
30 return 0;
31 }
32
33 static inline uint64_t blk_mig_bytes_remaining(void)
34 {
35 return 0;
36 }
37
38 static inline uint64_t blk_mig_bytes_total(void)
39 {
40 return 0;
41 }
42 #endif /* CONFIG_LIVE_BLOCK_MIGRATION */
43
44 void migrate_set_block_enabled(bool value, Error **errp);
45 #endif /* MIGRATION_BLOCK_H */