summaryrefslogtreecommitdiff
path: root/block/sheepdog.c
diff options
context:
space:
mode:
authorFam Zheng <famz@redhat.com>2016-01-26 11:58:48 +0800
committerMax Reitz <mreitz@redhat.com>2016-02-02 17:50:47 +0100
commit67a0fd2a9bca204d2b39f910a97c7137636a0715 (patch)
tree12dc70b53147c01182e6364582253bca9991a69f /block/sheepdog.c
parent1963f8d52e04a8f8b213e34e6a76fb286fb23ec1 (diff)
downloadqemu-67a0fd2a9bca204d2b39f910a97c7137636a0715.tar.gz
qemu-67a0fd2a9bca204d2b39f910a97c7137636a0715.tar.bz2
qemu-67a0fd2a9bca204d2b39f910a97c7137636a0715.zip
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 <famz@redhat.com> Message-id: 1453780743-16806-2-git-send-email-famz@redhat.com Reviewed-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'block/sheepdog.c')
-rw-r--r--block/sheepdog.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/block/sheepdog.c b/block/sheepdog.c
index ff89298b13..2ea05a6e28 100644
--- a/block/sheepdog.c
+++ b/block/sheepdog.c
@@ -2708,7 +2708,7 @@ retry:
static coroutine_fn int64_t
sd_co_get_block_status(BlockDriverState *bs, int64_t sector_num, int nb_sectors,
- int *pnum)
+ int *pnum, BlockDriverState **file)
{
BDRVSheepdogState *s = bs->opaque;
SheepdogInode *inode = &s->inode;