block: assert no image modification under BDRV_O_INACTIVE
commit504c205a0d4a790dba2be0dc0aab8b8d1b905a7d
authorDenis V. Lunev <den@openvz.org>
Wed, 5 Apr 2017 15:18:25 +0000 (5 18:18 +0300)
committerMax Reitz <mreitz@redhat.com>
Fri, 28 Apr 2017 14:02:03 +0000 (28 16:02 +0200)
tree41f3eb620d439d0333426c7b0c21de8382e5ba3e
parentd4a7f45ec9a54ca52e6381a792dc2aaea656338a
block: assert no image modification under BDRV_O_INACTIVE

As long as BDRV_O_INACTIVE is set, the image file is only opened so we
have a file descriptor for it. We're definitely not supposed to modify
the image, it's still owned by the migration source.

This commit is an addition to 09e0c771 but the assert() is added to
bdrv_truncate().

Signed-off-by: Denis V. Lunev <den@openvz.org>
CC: Kevin Wolf <kwolf@redhat.com>
CC: Max Reitz <mreitz@redhat.com>
Message-id: 1491405505-31620-3-git-send-email-den@openvz.org
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>
block.c