diff options
author | Max Reitz <mreitz@redhat.com> | 2019-07-25 17:55:10 +0200 |
---|---|---|
committer | Max Reitz <mreitz@redhat.com> | 2019-08-19 17:13:26 +0200 |
commit | ad6434dc620958503a0ad2ab92269805c26bb806 (patch) | |
tree | 483bc37b3d499b3e3128c9e176fc3287e7df4fd2 /block | |
parent | 9463ee1f5f4e0c496f2f1f3ae641b650f4836627 (diff) |
vdi: Make block_status recurse for fixed images
Suggested-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Fixes: 69f47505ee66afaa513305de0c1895a224e52c45
Signed-off-by: Max Reitz <mreitz@redhat.com>
Message-id: 20190725155512.9827-2-mreitz@redhat.com
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: John Snow <jsnow@redhat.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'block')
-rw-r--r-- | block/vdi.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/block/vdi.c b/block/vdi.c index 0caa3f281d..806ba7f53c 100644 --- a/block/vdi.c +++ b/block/vdi.c @@ -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 |