summaryrefslogtreecommitdiff
path: root/block/io.c
diff options
context:
space:
mode:
authorMax Reitz <mreitz@redhat.com>2017-04-11 17:52:26 +0200
committerKevin Wolf <kwolf@redhat.com>2017-04-27 15:39:49 +0200
commit362b3786ebd1f97737783b53de056265efa9e870 (patch)
tree6f0e4dfc00fd448c7a29a8826c80aec2accbbd83 /block/io.c
parent0d5e0bb2f78d04955a34ad6784cc7d457716df83 (diff)
downloadqemu-362b3786ebd1f97737783b53de056265efa9e870.tar.gz
Revert "block/io: Comment out permission assertions"
This reverts commit e3e0003a8f6570aba1421ef99a0b383a43371a74. This commit was necessary for the 2.9 release because we were unable to fix the underlying issue(s) in time. However, we will be for 2.10. Signed-off-by: Max Reitz <mreitz@redhat.com> Acked-by: Fam Zheng <famz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block/io.c')
-rw-r--r--block/io.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/block/io.c b/block/io.c
index a7142e00e8..a32fd1d9e5 100644
--- a/block/io.c
+++ b/block/io.c
@@ -1362,16 +1362,8 @@ 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);
- /* 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);
+ assert(child->perm & BLK_PERM_WRITE);
+ assert(end_sector <= bs->total_sectors || child->perm & BLK_PERM_RESIZE);
ret = notifier_with_return_list_notify(&bs->before_write_notifiers, req);