lirans@il.ibm.com | c163b5c | 2009-11-02 15:40:58 +0200 | [diff] [blame] | 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 | |
Markus Armbruster | 121d071 | 2016-06-29 10:12:57 +0200 | [diff] [blame] | 14 | #ifndef MIGRATION_BLOCK_H |
| 15 | #define MIGRATION_BLOCK_H |
lirans@il.ibm.com | c163b5c | 2009-11-02 15:40:58 +0200 | [diff] [blame] | 16 | |
Dr. David Alan Gilbert | ed1701c | 2017-05-15 15:05:29 +0100 | [diff] [blame] | 17 | #ifdef CONFIG_LIVE_BLOCK_MIGRATION |
Jan Kiszka | 25f2364 | 2009-11-30 18:21:21 +0100 | [diff] [blame] | 18 | int blk_mig_active(void); |
Peter Lieven | 9ac78b6 | 2017-09-26 12:33:16 +0200 | [diff] [blame] | 19 | int blk_mig_bulk_active(void); |
Jan Kiszka | 25f2364 | 2009-11-30 18:21:21 +0100 | [diff] [blame] | 20 | uint64_t blk_mig_bytes_transferred(void); |
| 21 | uint64_t blk_mig_bytes_remaining(void); |
| 22 | uint64_t blk_mig_bytes_total(void); |
Jan Kiszka | 3c095c3 | 2009-11-30 18:21:20 +0100 | [diff] [blame] | 23 | |
Dr. David Alan Gilbert | ed1701c | 2017-05-15 15:05:29 +0100 | [diff] [blame] | 24 | #else |
Dr. David Alan Gilbert | ed1701c | 2017-05-15 15:05:29 +0100 | [diff] [blame] | 25 | static inline int blk_mig_active(void) |
| 26 | { |
| 27 | return false; |
| 28 | } |
Peter Lieven | 9ac78b6 | 2017-09-26 12:33:16 +0200 | [diff] [blame] | 29 | |
| 30 | static inline int blk_mig_bulk_active(void) |
| 31 | { |
| 32 | return false; |
| 33 | } |
| 34 | |
Dr. David Alan Gilbert | ed1701c | 2017-05-15 15:05:29 +0100 | [diff] [blame] | 35 | static inline uint64_t blk_mig_bytes_transferred(void) |
| 36 | { |
| 37 | return 0; |
| 38 | } |
Juan Quintela | 2833c59 | 2017-04-05 18:32:37 +0200 | [diff] [blame] | 39 | |
Dr. David Alan Gilbert | ed1701c | 2017-05-15 15:05:29 +0100 | [diff] [blame] | 40 | static inline uint64_t blk_mig_bytes_remaining(void) |
| 41 | { |
| 42 | return 0; |
| 43 | } |
| 44 | |
| 45 | static inline uint64_t blk_mig_bytes_total(void) |
| 46 | { |
| 47 | return 0; |
| 48 | } |
| 49 | #endif /* CONFIG_LIVE_BLOCK_MIGRATION */ |
| 50 | |
| 51 | void migrate_set_block_enabled(bool value, Error **errp); |
Markus Armbruster | 121d071 | 2016-06-29 10:12:57 +0200 | [diff] [blame] | 52 | #endif /* MIGRATION_BLOCK_H */ |