History | View | Annotate | Download (19.7 kB)
prepare for future GPLv2+ relicensing
All files under GPLv2 will get GPLv2+ changes starting tomorrow.event_notifier.c and exec-obsolete.h were only ever touched by Red Hatemployees and can be relicensed now.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>...
block: bdrv_aio_* do not return NULL
Initially done with the following semantic patch:
rule1 expression E;statement S;@@ E =( bdrv_aio_readv | bdrv_aio_writev | bdrv_aio_flush | bdrv_aio_discard | bdrv_aio_ioctl) (...);(- if (E == NULL) { ... }...
rule1
block: convert qemu_aio_flush() calls to bdrv_drain_all()
Many places in QEMU call qemu_aio_flush() to complete all pendingasynchronous I/O. Most of these places actually want to drain all blockrequests but there is no block layer API to do so.
This patch introduces the bdrv_drain_all() API to wait for requests...
Fix some spelling bugs in documentation and comments
These errors were detected by codespell:
remaing -> remainingsoley -> solelyvirutal -> virtualseperate -> separate
libcacard.txt still needs some more patches.
Signed-off-by: Stefan Weil <sw@weilnetz.de>...
migration: change has_error to contain errno values
We normally already have an errno value. When not, abuse EIO.
Signed-off-by: Juan Quintela <quintela@redhat.com>
migration: rename qemu_file_has_error to qemu_file_get_error
Now the function returned errno, so it is better the new name.
Signed-off-by: Juan Quintela <quintela@redhat.com>Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
migration: use qemu_file_get_error() return value when possible
migration: make *save_live return errors
Make *save_live() return negative values when there is one error, andupdates all callers to check for the error.
Use glib memory allocation and free functions
qemu_malloc/qemu_free no longer exist after this commit.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Strip trailing '\n' from error_report()'s first argument
error_report() prepends location, and appends a newline. The messageconstructed from the arguments should not contain a newline. Fix theobvious offenders.
Signed-off-by: Markus Armbruster <armbru@redhat.com>...
Improve accuracy of block migration bandwidth calculation
block_mig_state.total_time is currently the sum of the read requestlatencies. This is not very accurate because block migration uses aio andso several requests can be submitted at once. Bandwidth should be computed...
Fix integer overflow in block migration bandwidth calculation
block_mig_state.reads is an int, and multiplying by BLOCK_SIZE yielded anegative number, resulting in a negative bandwidth (running on a 32-bitmachine). Change order to avoid.
Signed-off-by: Avishay Traeger <avishay@il.ibm.com>...
block-migration: actually disable dirty tracking on cleanup
Call to set_dirty_tracking() is misplaced.
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block-migration: add reference to target DriveInfo
So that ejection of attached device by guest does not free datain use by block migration instance.
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>CC: Markus Armbruster <armbru@redhat.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block: enable in_use flag
Set block device in use during block migration, disallow drive_del andbdrv_truncate for in use devices.
Fix block migration when the device size is not a multiple of 1 MB
b02bea3a85cc939f09aa674a3f1e4f36d418c007 added a check on the returnvalue of bdrv_write and aborts migration when it fails. However, if thesize of the block device to migrate is not a multiple of BLOCK_SIZE...
Avoid divide by zero when there is no block device to migrate
When block migration is requested and no read-write block device ispresent, a divide by zero exception is triggered becausetotal_sector_sum equals zero.
Signed-off-by: Pierre Riteau <Pierre.Riteau@irisa.fr>...
block migration: do not submit multiple AIOs for same sector (v2)
An old version of this patch was applied to master, so this contains thedifferences between v1 and v2.
block migration: do not submit multiple AIOs for same sector
Block migration can submit multiple AIO reads for the same sector/chunk, butcompletion of such reads can happen out of order:
migration guest- get_dirty(N)- aio_read(N)- clear_dirty(N)...
block migration: replace tabs by spaces.
Signed-off-by: Yoshiaki Tamura <tamura.yoshiaki@lab.ntt.co.jp>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block migration: propagate return value when bdrv_write() returns < 0
Currently block_load() doesn't check return value of bdrv_write(), andeven the destination weren't prepared to execute block migration, itproceeds and guest boots on the target. This patch fix this issue....
Block migration fail, ignore error from bdrv_getlength
When there is no block driver associate with BlockDriverState bdrv_getlengthreturns -ENOMEDIUM that cause block migration to fail
Signed-off-by: Shahar Havivi <shaharh@redhat.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Merge remote branch 'kwolf/for-anthony' into staging
savevm: Add DeviceState param
When available, we'd like to be able to access the DeviceStatewhen registering a savevm. For buses with a get_dev_path()function, this will allow us to create more unique savevmid strings.
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>...
block migration: Fix test for read-only drive
init_blk_migration_it() skips drives with type hint BDRV_TYPE_CDROM.The intention is to skip read-only drives. However, BDRV_TYPE_CDROMis only a hint. It is currently sufficent for read-only. But it'snot necessary, and it may not remain sufficient....
block: Do not export bdrv_first
The bdrv_first linked list of BlockDriverStates is currently extern sothat block migration can iterate the list. However, since there isalready a bdrv_iterate() function there is no need to expose bdrv_first.
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>...
Tranfer dirty blocks during iterative phase
Start transfer dirty blocks during the iterative stage. That willreduce the time that the guest will be suspended
Signed-off-by: Liran Schour <lirans@il.ibm.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Try not to exceed max downtime on stage3
Move to stage3 only when remaining work can be done below max downtime.Use qemu_get_clock_ns for measuring read performance.
Remove unused code
blk_mig_save_bulked_block is never called with sync flag. Remove the syncflag. Calculate bulk completion during blk_mig_save_bulked_block.Remove unused constants.
Do not use dprintf
dprintf is already claimed by POSIX1, and on at least one systemis implemented as a macro
[1] http://www.opengroup.org/onlinepubs/9699919799/functions/dprintf.html
Signed-off-by: malc <av1474@comtv.ru>
block migration: Skip zero-sized disks
No need to migrate emptiness (risking divide by zero later on).
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
block migration: Add support for restore progress reporting
Inject progress report in percentage into the block live stream. Thiscan be read out and displayed easily on restore.
block migration: Clean up use of total_sectors
We already save total_sectors in BlkMigDevState, let's use this valueduring the migration and avoid to recalculate it needlessly.
block migration: Consolidate mig_read_device_bulk into mig_save_device_bulk
Both functions share a lot of code, so make them one.
block migration: Consolidate block transmission
Based on the original patch by Pierre Riteau: Use a common blk_sendfunction to transmit a block.
block migration: Add error handling/propagation
live migration: Allow cleanup after cancellation or error
Introduce qemu_savevm_state_cancel and inject a stage -1 to cancel alive migration. This gives the involved subsystems a chance to clean updynamically allocated resources. Namely, the block migration layer can...
block migration: Report overall migration progress
So far progress reporting only works for the first block device. Fixthis by keeping an overall sum of sectors to be migratated, calculatingthe sum of all processed sectors, and finally basing the progress...
live migration: Propagate output monitor to callback handler
In order to allow proper progress reporting to the monitor thatinitiated the migration, forward the monitor reference through themigration layer down to SaveLiveStateHandler.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>...
block migration: Fix outgoing progress output
Report progress of an outgoing live migration to the monitor instead ofstdout.
block migration: Report progress also via info migration
block migration: Fix coding style and whitespaces
No functional changes.
block migration: Rework constants API
Instead of duplicating the definition of constants or introducingtrivial retrieval functions move the SECTOR constants into the publicblock API. This also obsoletes sector_per_block in BlkMigState.
block migration: Avoid large stack buffer
Move a potentially large buffer from stack to heap.
block migration: Avoid indirection of block_mig_state
No need to push block_mig_state to the heap and, thus, establish anindirection.
block migration: Drop dead code
block migration: Switch device and block lists to QSIMPLEQ
Based on the original patch by Pierre Riteau.
block migration: Initialize remaining BlkMigState fields
In case we restart a migration, submitted, read_done, transferred, andprint_completion need to be reinitialized to 0.
Fix mingw32 build
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Block live migration
This patch introduces block migration called during live migration. Blockare being copied to the destination in an async way. First the code willtransfer the whole disk and then transfer all dirty blocks accumulted duringthe migration....