From 67a0fd2a9bca204d2b39f910a97c7137636a0715 Mon Sep 17 00:00:00 2001 From: Fam Zheng Date: Tue, 26 Jan 2016 11:58:48 +0800 Subject: block: Add "file" output parameter to block status query functions The added parameter can be used to return the BDS pointer which the valid offset is referring to. Its value should be ignored unless BDRV_BLOCK_OFFSET_VALID in ret is set. Until block drivers fill in the right value, let's clear it explicitly right before calling .bdrv_get_block_status. The "bs->file" condition in bdrv_co_get_block_status is kept now to keep iotest case 102 passing, and will be fixed once all drivers return the right file pointer. Signed-off-by: Fam Zheng Message-id: 1453780743-16806-2-git-send-email-famz@redhat.com Reviewed-by: Max Reitz Signed-off-by: Max Reitz --- block/vvfat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'block/vvfat.c') diff --git a/block/vvfat.c b/block/vvfat.c index 2ea5a4ab0b..b8d29e17cd 100644 --- a/block/vvfat.c +++ b/block/vvfat.c @@ -2884,7 +2884,7 @@ static coroutine_fn int vvfat_co_write(BlockDriverState *bs, int64_t sector_num, } static int64_t coroutine_fn vvfat_co_get_block_status(BlockDriverState *bs, - int64_t sector_num, int nb_sectors, int* n) + int64_t sector_num, int nb_sectors, int *n, BlockDriverState **file) { BDRVVVFATState* s = bs->opaque; *n = s->sector_count - sector_num; -- cgit v1.2.1