]> Git Repo - qemu.git/commitdiff
vdi: Make block_status recurse for fixed images
authorMax Reitz <[email protected]>
Thu, 25 Jul 2019 15:55:10 +0000 (17:55 +0200)
committerMax Reitz <[email protected]>
Mon, 19 Aug 2019 15:13:26 +0000 (17:13 +0200)
Suggested-by: Vladimir Sementsov-Ogievskiy <[email protected]>
Fixes: 69f47505ee66afaa513305de0c1895a224e52c45
Signed-off-by: Max Reitz <[email protected]>
Message-id: 20190725155512[email protected]
Reviewed-by: Vladimir Sementsov-Ogievskiy <[email protected]>
Reviewed-by: John Snow <[email protected]>
Signed-off-by: Max Reitz <[email protected]>
block/vdi.c

index 0caa3f281d262f2dcb00a8d13d28f7cfb7ea20b0..806ba7f53c7b706ff3f4523fe3d7041b96cbcd5d 100644 (file)
@@ -542,7 +542,8 @@ static int coroutine_fn vdi_co_block_status(BlockDriverState *bs,
     *map = s->header.offset_data + (uint64_t)bmap_entry * s->block_size +
         index_in_block;
     *file = bs->file->bs;
-    return BDRV_BLOCK_DATA | BDRV_BLOCK_OFFSET_VALID;
+    return BDRV_BLOCK_DATA | BDRV_BLOCK_OFFSET_VALID |
+        (s->header.image_type == VDI_TYPE_STATIC ? BDRV_BLOCK_RECURSE : 0);
 }
 
 static int coroutine_fn
This page took 0.038389 seconds and 4 git commands to generate.