block/parallels: Do not update header or truncate image when INMIGRATE
commit6c7d390b993c4bbadd51ceeb41f7d2fdd68cb4fd
authorJeff Cody <jcody@redhat.com>
Tue, 7 Nov 2017 13:10:34 +0000 (7 08:10 -0500)
committerMax Reitz <mreitz@redhat.com>
Tue, 14 Nov 2017 17:06:25 +0000 (14 18:06 +0100)
tree426bfba93492504910b6c625f9344ce5d4ada801
parent7479bf07c452cc5a3ace46f8e33fd60b25d12234
block/parallels: Do not update header or truncate image when INMIGRATE

If we write or modify the image file while the QEMU run state is
INMIGRATE, then the BDRV_O_INACTIVE BDS flag is set.  This will cause
an assert, since the image is marked inactive.  Make sure we obey this
flag.

Tested-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Signed-off-by: Jeff Cody <jcody@redhat.com>
Message-id: 3996c930fa8cde8570b7a63032720d76a28fd78b.1510059970.git.jcody@redhat.com
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Denis V. Lunev <den@openvz.org>
Signed-off-by: Max Reitz <mreitz@redhat.com>
block/parallels.c