From: Max Reitz Date: Thu, 25 Jul 2019 15:55:12 +0000 (+0200) Subject: vpc: Do not return RAW from block_status X-Git-Tag: pull-nvme-20200902~805^2~2 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=fbc8e1b7e49dee9b137c1037dc72d8e6fd4aba3d;p=qemu-nvme.git vpc: Do not return RAW from block_status vpc is not really a passthrough driver, even when using the fixed subformat (where host and guest offsets are equal). It should handle preallocation like all other drivers do, namely by returning DATA | RECURSE instead of RAW. There is no tangible difference but the fact that bdrv_is_allocated() no longer falls through to the protocol layer. Signed-off-by: Max Reitz Message-id: 20190725155512.9827-4-mreitz@redhat.com Reviewed-by: John Snow Signed-off-by: Max Reitz --- diff --git a/block/vpc.c b/block/vpc.c index d4776ee8a5..b25aab0425 100644 --- a/block/vpc.c +++ b/block/vpc.c @@ -737,7 +737,7 @@ static int coroutine_fn vpc_co_block_status(BlockDriverState *bs, *pnum = bytes; *map = offset; *file = bs->file->bs; - return BDRV_BLOCK_RAW | BDRV_BLOCK_OFFSET_VALID; + return BDRV_BLOCK_DATA | BDRV_BLOCK_OFFSET_VALID | BDRV_BLOCK_RECURSE; } qemu_co_mutex_lock(&s->lock);