summaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
authorMax Reitz2017-04-11 16:50:50 +0200
committerPeter Maydell2017-04-11 17:09:31 +0200
commite3e0003a8f6570aba1421ef99a0b383a43371a74 (patch)
tree435e186f9b17275eedac2f385eb9997b19ad69e8 /block
parentsheepdog: Fix crash in co_read_response() (diff)
downloadqemu-e3e0003a8f6570aba1421ef99a0b383a43371a74.tar.gz
qemu-e3e0003a8f6570aba1421ef99a0b383a43371a74.tar.xz
qemu-e3e0003a8f6570aba1421ef99a0b383a43371a74.zip
block/io: Comment out permission assertions
In case of block migration, there may be writes to BlockBackends that do not have the write permission taken. Before this issue is fixed (which is not going to happen in 2.9), we therefore cannot assert that this is the case. Suggested-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Tested-by: Kevin Wolf <kwolf@redhat.com> Message-id: 20170411145050.31290-1-mreitz@redhat.com Tested-by: Laurent Vivier <lvivier@redhat.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'block')
-rw-r--r--block/io.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/block/io.c b/block/io.c
index bae6947032..8706bfa578 100644
--- a/block/io.c
+++ b/block/io.c
@@ -1345,8 +1345,16 @@ static int coroutine_fn bdrv_aligned_pwritev(BdrvChild *child,
assert(!waited || !req->serialising);
assert(req->overlap_offset <= offset);
assert(offset + bytes <= req->overlap_offset + req->overlap_bytes);
- assert(child->perm & BLK_PERM_WRITE);
- assert(end_sector <= bs->total_sectors || child->perm & BLK_PERM_RESIZE);
+ /* FIXME: Block migration uses the BlockBackend of the guest device at a
+ * point when it has not yet taken write permissions. This will be
+ * fixed by a future patch, but for now we have to bypass this
+ * assertion for block migration to work. */
+ // assert(child->perm & BLK_PERM_WRITE);
+ /* FIXME: Because of the above, we also cannot guarantee that all format
+ * BDS take the BLK_PERM_RESIZE permission on their file BDS, since
+ * they are not obligated to do so if they do not have any parent
+ * that has taken the permission to write to them. */
+ // assert(end_sector <= bs->total_sectors || child->perm & BLK_PERM_RESIZE);
ret = notifier_with_return_list_notify(&bs->before_write_notifiers, req);