From 53f1dfd1ff5a603ea1bd67b925758d22f54e1f8a Mon Sep 17 00:00:00 2001 From: Fam Zheng Date: Tue, 26 Jan 2016 11:58:54 +0800 Subject: qed: Assign bs->file->bs to file in bdrv_qed_co_get_block_status Reviewed-by: Eric Blake Reviewed-by: Stefan Hajnoczi Signed-off-by: Fam Zheng Message-id: 1453780743-16806-8-git-send-email-famz@redhat.com Signed-off-by: Max Reitz --- block/qed.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'block') diff --git a/block/qed.c b/block/qed.c index 8f6f8415d6..404be1e9b9 100644 --- a/block/qed.c +++ b/block/qed.c @@ -693,6 +693,7 @@ typedef struct { uint64_t pos; int64_t status; int *pnum; + BlockDriverState **file; } QEDIsAllocatedCB; static void qed_is_allocated_cb(void *opaque, int ret, uint64_t offset, size_t len) @@ -704,6 +705,7 @@ static void qed_is_allocated_cb(void *opaque, int ret, uint64_t offset, size_t l case QED_CLUSTER_FOUND: offset |= qed_offset_into_cluster(s, cb->pos); cb->status = BDRV_BLOCK_DATA | BDRV_BLOCK_OFFSET_VALID | offset; + *cb->file = cb->bs->file->bs; break; case QED_CLUSTER_ZERO: cb->status = BDRV_BLOCK_ZERO; @@ -735,6 +737,7 @@ static int64_t coroutine_fn bdrv_qed_co_get_block_status(BlockDriverState *bs, .pos = (uint64_t)sector_num * BDRV_SECTOR_SIZE, .status = BDRV_BLOCK_OFFSET_MASK, .pnum = pnum, + .file = file, }; QEDRequest request = { .l2_table = NULL }; -- cgit v1.2.3