]> Git Repo - qemu.git/commitdiff
vpc: Do not return RAW from block_status
authorMax Reitz <[email protected]>
Thu, 25 Jul 2019 15:55:12 +0000 (17:55 +0200)
committerMax Reitz <[email protected]>
Mon, 19 Aug 2019 15:13:26 +0000 (17:13 +0200)
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 <[email protected]>
Message-id: 20190725155512[email protected]
Reviewed-by: John Snow <[email protected]>
Signed-off-by: Max Reitz <[email protected]>
block/vpc.c

index d4776ee8a5229ff43e8fb4fb6e0f38c4ec348770..b25aab042544906533c757b35ceb082f7464d6ea 100644 (file)
@@ -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);
This page took 0.025648 seconds and 4 git commands to generate.