block/migration: Disable cache invalidate for incoming migration
commit7ea2d269cb84ca7a2f4b7c3735634176f7c1dc35
authorAlexey Kardashevskiy <aik@ozlabs.ru>
Thu, 9 Oct 2014 02:50:46 +0000 (9 13:50 +1100)
committerJuan Quintela <quintela@trasno.org>
Tue, 14 Oct 2014 07:35:21 +0000 (14 09:35 +0200)
tree7db382cb3a25419bfafdfa8bfa8f8f248debe1bd
parent9935baca9b3573dfdb19aff03b3cbe1116350400
block/migration: Disable cache invalidate for incoming migration

When migrated using libvirt with "--copy-storage-all", at the end of
migration there is race between NBD mirroring task trying to do flush
and migration completion, both end up invalidating cache. Since qcow2
driver does not handle this situation very well, random crashes happen.

This disables the BDRV_O_INCOMING flag for the block device being migrated
once the cache has been invalidated.

Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
--

fixed parens by hand
Signed-off-by: Juan Quintela <quintela@redhat.com>
block.c
migration.c
nbd.c