aboutsummaryrefslogtreecommitdiff
path: root/block.c
diff options
context:
space:
mode:
authorMax Reitz <mreitz@redhat.com>2017-04-11 16:50:50 +0200
committerPeter Maydell <peter.maydell@linaro.org>2017-04-11 16:09:31 +0100
commite3e0003a8f6570aba1421ef99a0b383a43371a74 (patch)
tree435e186f9b17275eedac2f385eb9997b19ad69e8 /block.c
parent5eceb01adfbe513c0309528293b0b86e32a6e27d (diff)
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.c')
-rw-r--r--block.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/block.c b/block.c
index 086a12df97..1fbbb8d606 100644
--- a/block.c
+++ b/block.c
@@ -3274,7 +3274,11 @@ int bdrv_truncate(BdrvChild *child, int64_t offset)
BlockDriver *drv = bs->drv;
int ret;
- assert(child->perm & BLK_PERM_RESIZE);
+ /* FIXME: Some format block drivers use this function instead of implicitly
+ * growing their file by writing beyond its end.
+ * See bdrv_aligned_pwritev() for an explanation why we currently
+ * cannot assert this permission in that case. */
+ // assert(child->perm & BLK_PERM_RESIZE);
if (!drv)
return -ENOMEDIUM;