Skip to content

Commit

Permalink
vdi: Make block_status recurse for fixed images
Browse files Browse the repository at this point in the history
Suggested-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Fixes: 69f4750
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>
  • Loading branch information
XanClic committed Aug 19, 2019
1 parent 9463ee1 commit ad6434d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion block/vdi.c
Expand Up @@ -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
Expand Down

0 comments on commit ad6434d

Please sign in to comment.